Experimental Discord bot written in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

rocketbot.py 352B

1234567891011121314151617
  1. import discord
  2. client = discord.Client()
  3. @client.event
  4. async def on_ready():
  5. print('We have logged in as {0.user}'.format(client))
  6. @client.event
  7. async def on_message(message):
  8. if message.author == client.user:
  9. return
  10. if message.content.startswith('$hello'):
  11. await message.channel.send('Hello!')
  12. client.run('bot token')