Experimental Discord bot written in Python
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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