mirror of
https://github.com/kemko/xc.git
synced 2026-01-01 15:55:43 +03:00
icqbot logging
This commit is contained in:
@@ -5,7 +5,7 @@ from bot.bot import Bot
|
||||
|
||||
ICQ_TOKEN = os.environ.get("ICQ_TOKEN")
|
||||
ICQ_CHAT_ID = os.environ.get("ICQ_CHAT_ID")
|
||||
ICQ_API_URL = os.environ.get("ICQ_API_URL", "api.icq.net")
|
||||
ICQ_API_URL = os.environ.get("ICQ_API_URL", "https://api.icq.net/bot/v1")
|
||||
|
||||
def send(message):
|
||||
if not ICQ_TOKEN:
|
||||
@@ -15,8 +15,10 @@ def send(message):
|
||||
if not message:
|
||||
raise ValueError("message is empty")
|
||||
|
||||
bot = Bot(token=ICQ_TOKEN)
|
||||
bot.send_text(chat_id=ICQ_CHAT_ID, text=message)
|
||||
print("using api base %s" % ICQ_API_URL)
|
||||
bot = Bot(token=ICQ_TOKEN, api_url_base=ICQ_API_URL)
|
||||
r = bot.send_text(chat_id=ICQ_CHAT_ID, text=message)
|
||||
print("response was:", r)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user