Refactor presence to loops.
This commit is contained in:
@@ -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))
|
||||
@@ -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))
|
||||
Reference in New Issue
Block a user