【发布时间】:2021-04-29 04:33:49
【问题描述】:
我正在尝试使命令也提及编写命令的人,如何将其添加到当前命令中:
import discord
from discord.ext import commands
token = "" #bot token here
client = commands.Bot(command_prefix= "!")
@client.command()
async def ping(ctx):
await ctx.send('pong')
我已尝试添加此代码:
@client.command()
async def command(ctx):
author = ctx.message.author
.. 但它在打印作者时对我没有用。
【问题讨论】:
标签: python discord bots discord.py