Experimental Discord bot written in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

general.py 377B

1234567891011121314151617
  1. from discord.ext import commands
  2. class GeneralCog(commands.Cog):
  3. def __init__(self, bot: commands.Bot):
  4. self.bot = bot
  5. self.is_connected = False
  6. self.is_ready = False
  7. @commands.Cog.listener()
  8. async def on_connect(self):
  9. print('on_connect')
  10. self.is_connected = True
  11. @commands.Cog.listener()
  12. async def on_ready(self):
  13. print('on_ready')
  14. self.is_ready = True