From 1199c74aa711ea86651705e72987365f5fc65185 Mon Sep 17 00:00:00 2001 From: trueold89 Date: Mon, 3 Jun 2024 16:59:02 +0300 Subject: [PATCH] Add comments/docstrings to bot.py --- hellmbot/bot.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hellmbot/bot.py b/hellmbot/bot.py index 014c3cf..a792a6c 100644 --- a/hellmbot/bot.py +++ b/hellmbot/bot.py @@ -11,20 +11,34 @@ from discord.ext import commands ############### def init_bot() -> commands.Bot: + """ + Initializes the bot object + + :return: Bot class object + """ intents = Intents.default() intents.message_content = True return commands.Bot(command_prefix="/", intents=intents) +# Init bot object bot = init_bot() def start() -> None: + """ + Starts bot polling + """ bot.run(ENV.BOT_TOKEN.fget(None)) @bot.command() async def create(ctx: commands.Context) -> None: + """ + Creates a group of voice channels to move the user and adds their id to the database + + :param ctx: Command context + """ server = ctx.guild db = ServersDB(server.id) circles_count = ENV.CIRCLES_COUNT.fget(None)