在python中嵌入discord的问题,命令提示符上没有响应,也没有discord

在python中嵌入discord的问题,命令提示符上没有响应,也没有discord,python,bots,embed,discord.py,Python,Bots,Embed,Discord.py,我正试图制作一些机器人称之为“有趣”的命令,我想嵌入它们。然而,它没有吐出任何东西,甚至没有在discord或命令提示符上出现错误,也没有让我知道如何改进代码。我还想实现一种使用成员的方法:commands.Greedy[discord.members]code,这样我就可以找到谁是这个命令的目标,但我想我需要先解决这个问题。有什么建议吗? 我也被难倒了,因为我使用了.format和f字符串来尝试使用参数,我也尝试了使用消息,但这给了我一个语法错误“error”list“object has n

我正试图制作一些机器人称之为“有趣”的命令,我想嵌入它们。然而,它没有吐出任何东西,甚至没有在discord或命令提示符上出现错误,也没有让我知道如何改进代码。我还想实现一种使用成员的方法:
commands.Greedy[discord.members]
code,这样我就可以找到谁是这个命令的目标,但我想我需要先解决这个问题。有什么建议吗? 我也被难倒了,因为我使用了
.format
f
字符串来尝试使用参数,我也尝试了使用
消息
,但这给了我一个语法错误“error”list“object has no attribute”“notice”。我真的无法理解命令上的文档,因为它们没有给出任何实际代码的示例,而且我很难理解新的东西。有人能弄明白吗

from discord.ext import commands
import discord
bot= commands.Bot(command_prefix='0!')
@bot.event
async def on_message(message):
     if message.author == bot.user:
          return
     if message.content.startswith('Sample Text'):
          await message.channel.send('Sample Text')
@bot.command()
async def slap(ctx):
    embed = discord.Embed(color=0x00ff00, title='OH! Z E  S L A P !', description="ooh, that hurt.")
    embed.add_field(name="Man behind the slaughter:", value="test")
    await ctx.send(embed=embed)
bot.run('token here')```
-During this edit, when I just had the 'bot command' area, It seemed to have functioned still. This makes it even more confusing...

覆盖\u message()事件上提供的默认值
,将禁止运行任何额外的命令。要解决此问题,请在消息()上的
事件末尾添加
bot.process\u命令(消息)

@bot.event
异步def on_消息(消息):
如果message.author==bot.user:
返回
如果message.content.startswith('Sample Text'):
wait message.channel.send('示例文本')
等待bot.process_命令(消息)

您能否更新您的问题,使您的代码成为一个问题?它可能是一个停止您的命令的
on_message
事件,但如果没有完整的示例,则不能这样说。完成!我这样做了,我想这是你所说的关于你的信息的
,但我需要更多的帮助和细节;~;您需要将
wait bot.process_命令(消息)
添加到您的
on_消息
事件中。看,是的!非常感谢。