text: from flask import Flask, request, abort
  
  from linebot import (
      LineBotApi, WebhookHandler
  )
  from linebot.exceptions import (
      InvalidSignatureError
  )
  from linebot.models import *
  
  
  #======這裡是呼叫的檔案內容=====
  from message import *
  from new import *
  from Function import *
  #======這裡是呼叫的檔案內容=====
  
  app = Flask(__name__)
  
  # Channel Access Token
  line_bot_api = LineBotApi('QWIgd0xkTKOzUNQNZI9PjUOLh6EgtrR+04f7DLT5N2HZ63M6vQDOi/tnGHT4a5tNfwecApuzDRF2FpAGHOylqABABIkQNDasheRFoXbW8hAMngTgpgPjSnuGgptGjsKkefa0WGb/xCjKof/hhsbbgAdB04t89/1O/w1cDnyilFU=')
  # Channel Secret
  handler = WebhookHandler('4fcbeb25bb3885bb21cda5c99cec1d9a')
  
  # 監聽所有來自 /callback 的 Post Request
  @app.route("/callback", methods=['POST'])
  def callback():
      # get X-Line-Signature header value
      signature = request.headers['X-Line-Signature']
      # get request body as text
      body = request.get_data(as_text=True)
      app.logger.info("Request body: " + body)
      # handle webhook body
      try:
          handler.handle(body, signature)
      except InvalidSignatureError:
          abort(400)
      return 'OK'
  
  # 處理訊息
  @handler.add(MessageEvent, message=TextMessage)
  def handle_message(event):
      msg = event.message.text
      if '最新合作廠商' in msg:
          message = imagemap_message()
          line_bot_api.reply_message(event.reply_token, message)
      elif '最新活動訊息' in msg:
          message = buttons_message()
          line_bot_api.reply_message(event.reply_token, message)
      elif '註冊會員' in msg:
          message = Confirm_Template()
          line_bot_api.reply_message(event.reply_token, message)
      elif '旋轉木馬' in msg:
          message = Carousel_Template()
          line_bot_api.reply_message(event.reply_token, message)
      elif '圖片畫廊' in msg:
          message = test()
          line_bot_api.reply_message(event.reply_token, message)
      elif '功能列表' in msg:
          message = function_list()
          line_bot_api.reply_message(event.reply_token, message)
      else:
          message = TextSendMessage(text=msg)
          line_bot_api.reply_message(event.reply_token, message)
  
  
  import os
  if __name__ == "__main__":
      port = int(os.environ.get('PORT', 5000))
      app.run(host='0.0.0.0', port=port)
  