diff --git a/cogs/loops/__init__.py b/cogs/loops/__init__.py new file mode 100644 index 0000000..5cd44f5 --- /dev/null +++ b/cogs/loops/__init__.py @@ -0,0 +1,14 @@ +""" +Initializing code for all loops. +""" + +from nextcord.ext import commands + +from .bot_presence import BotPresence + + +# This function will be called when this extension is loaded. +# It is necessary to add these functions to the bot. +def setup(bot: commands.Bot): + """Adds function to bot""" + bot.add_cog(BotPresence(bot)) diff --git a/cogs/presence/__init__.py b/cogs/loops/bot_presence.py similarity index 85% rename from cogs/presence/__init__.py rename to cogs/loops/bot_presence.py index 6646e08..d752396 100644 --- a/cogs/presence/__init__.py +++ b/cogs/loops/bot_presence.py @@ -1,5 +1,5 @@ """ -Functions for controlling the bot's presence. +Functions for controlling the bot's presence. Also contains the loop. """ import random @@ -46,10 +46,3 @@ class BotPresence(commands.Cog, name="Bot Presence"): status += f" | {len(self.bot.guilds)} servers" await self.bot.change_presence(activity=nextcord.Game(status)) - - -# This function will be called when this extension is loaded. -# It is necessary to add these functions to the bot. -def setup(bot: commands.Bot): - """Adds function to bot""" - bot.add_cog(BotPresence(bot))