Experimental Discord bot written in Python
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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