-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (24 loc) · 891 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os
import asyncio
from custom_logger import Logger
from database import DatabaseCreator
# Initialize the logger for the main module
logger = Logger('gwaff.main')
logger.info("Starting")
from warnings import filterwarnings
# Suppress specific warnings from the matplotlib module
filterwarnings("ignore", category=RuntimeWarning, module="matplotlib\..*", lineno=0)
filterwarnings("ignore", category=UserWarning, module="matplotlib\..*", lineno=0)
logger.info("Filtering warnings")
dbc = DatabaseCreator()
dbc.create_database()
# from collector import collect
# Collect data using the collect function from the collector module
# collect()
logger.info("Collecting")
from bot import run_the_bot
# Retrieve the bot token from environment variables
TOKEN = os.environ.get('BOT_TOKEN')
# Run the bot using the retrieved token
asyncio.run(run_the_bot(TOKEN))
logger.info("Fin!")