【发布时间】:2022-07-16 00:30:32
【问题描述】:
我想用我的 discord 机器人发出禁令、踢和取消禁令命令。 我还希望它与斜杠命令兼容。 如果您需要代码,现在就在这里。
from nextcord.ext import commands
bot = commands.Bot()
@bot.event
async def on_message(message):
if message.author != bot.user:
print(f'(#{message.channel}) {message.author}: {message.content}')
@bot.event
async def on_message_delete(message):
print(f'User {message.author} has deleted "{message.content}"')
@bot.event
async def on_message_edit(before, after):
print(f'User {before.author} has edited "{before.content}" to "{after.content}"')
bot.run('my token')
【问题讨论】:
-
I want to make a ban, kick, and unban command with my discord bot. I also want it to be compatible with slash commands→ 好的,我们允许。请做出来。什么是实际问题?你想做什么? -
@rzlvmp 问题是如何将这些命令添加到我的代码中。我正在尝试添加它们