runabot/Christmas/Cogs/Event.py

22 lines
547 B
Python
Raw Normal View History

2023-11-25 17:28:48 +00:00
from discord import ApplicationContext, DiscordException, Game
from discord.ext.commands import Cog
class Event(Cog):
def __init__(self, bot):
self.bot = bot
@Cog.listener()
async def on_application_command_error(ctx: ApplicationContext, exception: DiscordException) -> None:
pass
@Cog.listener()
async def on_ready(self):
print("Ready!")
await self.bot.change_presence(activity=Game(name="크리스마스에 함께!"))
def setup(bot):
bot.add_cog(Event(bot))