Lurker/main.py
mctaylors b97d8d84c9
Some checks failed
Update production / Build and upload Lurker as artifact (push) Failing after 9s
Update production / Update Lurker on production (push) Failing after 4s
Add automatic deployment
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-11-06 22:24:41 +03:00

22 lines
544 B
Python

import aiohttp
import os
import client
import asyncio
from next.ext.commands import DefaultHelpCommand
from sys import exit
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())