-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgen_help_docs.py
43 lines (31 loc) · 1.35 KB
/
gen_help_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
41
42
43
import asyncio
import random
from pathlib import Path
from discord import Intents
from miyu_bot.bot.bot import MiyuBot
from miyu_bot.commands.docs.info_command_docs import generate_info_command_docs
from timeit import default_timer as timer
from miyu_bot.commands.docs.utility_command_docs import generate_utility_command_docs
async def main():
start = timer()
bot = MiyuBot("assets", gen_doc=True, command_prefix="/", intents=Intents.default())
bot.gen_doc = True
await bot.load_extension("miyu_bot.commands.cogs.info")
await bot.load_extension("miyu_bot.commands.cogs.card")
await bot.load_extension("miyu_bot.commands.cogs.event")
await bot.load_extension("miyu_bot.commands.cogs.music")
# Other cog will not have generated docs
# await bot.load_extension('miyu_bot.commands.cogs.other')
await bot.load_extension("miyu_bot.commands.cogs.preferences")
await bot.load_extension("miyu_bot.commands.cogs.audio")
await bot.load_extension("miyu_bot.commands.cogs.gacha")
random.seed(0)
generate_info_command_docs(
bot,
Path(__file__).parent / "docs/commands/info",
bot.cogs["Info"].master_filters,
)
generate_utility_command_docs(bot, Path(__file__).parent / "docs/commands/utility")
print(f"Generated docs in {timer() - start}s.")
if __name__ == "__main__":
asyncio.run(main())