【发布时间】:2020-05-11 05:49:19
【问题描述】:
这是我的代码。它仍处于早期开发阶段。另外,我对开发机器人还很陌生。
import discord
from discord.ext import commands
client = discord.Client()
bot_prefix: str = ">"
client = commands.Bot(command_prefix=bot_prefix)
@client.event
async def on_ready():
print('Miska Rise')
这是我现在的一个活动:
@client.event
async def on_message(message):
if message.author == client.user:
return None
if message.content.startswith('woof') or message.content.startswith('Woof'):
await message.channel.send('Bork!')
命令如下:
@client.command()
async def ping(ctx):
await ctx.send('Pong!')
【问题讨论】:
标签: python discord discord.py