finlaysawyer/discord-uptime

How to set bot activity???

Closed this issue · 1 comments

is this the correct code to set bot activty? if yes where do i put it?

await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="a movie"))

You can add this when the bot class is initialised. Import discord and add it on the end:

class DiscordUptime(commands.Bot):
    def __init__(self):
        super().__init__(
            command_prefix=get_config("prefix"),
            description="Bot to monitor uptime of services",
            reconnect=True,
            intents=Intents.default(),
            activity=discord.Activity(type=discord.ActivityType.watching, name="a movie")
        )
        self.bot = bot