1
0
Fork 0
mirror of https://git.mctaylors.ru/mctaylors/Lurker.git synced 2024-11-23 08:38:03 +03:00
Lurker/main.py
mctaylors 8fbd3356c0
Initial commit
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-11-06 17:09:21 +03:00

21 lines
523 B
Python

import aiohttp
import os
import client
import asyncio
from next.ext.commands import DefaultHelpCommand
async def main():
async with aiohttp.ClientSession() as session:
token = os.getenv("BOT_TOKEN")
if token is None:
print("Environment variable BOT_TOKEN is not set. Exiting.")
exit(1)
c = client.Client(session, token)
c.help_command = DefaultHelpCommand("Available commands")
print("Starting client...")
await c.start()
asyncio.run(main())