-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild_docs.py
40 lines (30 loc) · 884 Bytes
/
build_docs.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
38
39
40
import asyncio
import logging
import os
from dotenv import load_dotenv
from functions import build_docs
from index import Friday
# from create_trans_key import run
load_dotenv(dotenv_path="./.env")
TOKEN = os.environ.get('TOKENTEST')
class Friday_testing(Friday):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def on_ready(self):
build_docs(self, "!")
await asyncio.sleep(2)
await self.close()
# TODO: Add a check for functions modules/files not being named the same as the functions/defs
# def test_translate_key_gen():
# run()
if __name__ == "__main__":
bot = Friday_testing()
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(bot.start(TOKEN, bot=True))
except KeyboardInterrupt:
# mydb.close()
logging.info("STOPED")
loop.run_until_complete(bot.close())
finally:
loop.close()