Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 当我有两个具有不同URL的不同嵌入命令时,其中只有一个可以工作-有人能帮我解决这个问题吗? @client.event 异步def on_消息(消息): 如果message.content.startswith(“!axb”): 嵌入=discord.embed(title=“Axb:sparkles:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入) @客户端事件 异步def on_消息(消息): 如果message.content.startswith(“!opal”): 嵌入=discord.embed(title=“opal:sparks:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入)_Python_Discord_Discord.py - Fatal编程技术网

Python 当我有两个具有不同URL的不同嵌入命令时,其中只有一个可以工作-有人能帮我解决这个问题吗? @client.event 异步def on_消息(消息): 如果message.content.startswith(“!axb”): 嵌入=discord.embed(title=“Axb:sparkles:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入) @客户端事件 异步def on_消息(消息): 如果message.content.startswith(“!opal”): 嵌入=discord.embed(title=“opal:sparks:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入)

Python 当我有两个具有不同URL的不同嵌入命令时,其中只有一个可以工作-有人能帮我解决这个问题吗? @client.event 异步def on_消息(消息): 如果message.content.startswith(“!axb”): 嵌入=discord.embed(title=“Axb:sparkles:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入) @客户端事件 异步def on_消息(消息): 如果message.content.startswith(“!opal”): 嵌入=discord.embed(title=“opal:sparks:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入),python,discord,discord.py,Python,Discord,Discord.py,只有最后一条消息上的事件才会起作用,为什么不使用简单的elif语句呢 @client.event 异步def on_消息(消息): 如果message.content.startswith(“!axb”): 嵌入=discord.embed(title=“Axb:sparkles:”,description=“9b9t Bot Dev”,color=0xf188c9) 嵌入.set_图像(url='insert url') 等待message.channel.send(嵌入=嵌入) elif m

只有最后一条消息上的
事件才会起作用,为什么不使用简单的elif语句呢

@client.event
异步def on_消息(消息):
如果message.content.startswith(“!axb”):
嵌入=discord.embed(title=“Axb:sparkles:”,description=“9b9t Bot Dev”,color=0xf188c9)
嵌入.set_图像(url='insert url')
等待message.channel.send(嵌入=嵌入)
elif message.content.startswith(“!opal”):
嵌入=discord.embed(title=“opal:sparks:”,description=“9b9t Bot Dev”,color=0xf188c9)
嵌入.set_图像(url='insert url')
等待message.channel.send(嵌入=嵌入)