Python 如何发送包含对discord.py的反应的消息

Python 如何发送包含对discord.py的反应的消息,python,asynchronous,discord,discord.py,Python,Asynchronous,Discord,Discord.py,如何发送包含反应的消息? 我希望用户能够使用触发命令!测试,机器人以测试和红十字作为回应 我的代码: @client.command() async def Test(ctx, message = "test"): Message = await ctx.send(apme, "I like to take shortcuts a lot of the time, so I personally would write it like this: import discord from

如何发送包含反应的消息? 我希望用户能够使用触发命令!测试,机器人以测试和红十字作为回应

我的代码:

@client.command()
async def Test(ctx, message = "test"):

  Message = await ctx.send(apme, "I like to take shortcuts a lot of the time, so I personally would write it like this:

import discord
from discord.ext.commands import Bot
from discord.ext import commands

Client = discord.Client() # Initialise Client 
client = commands.Bot(command_prefix = "?") # Initialise client bot

@client.event
async def on_ready():
    print("ready")

@client.event
async def on_message(message):
    if message.content == "!test" in message.content:
        await message.channel.send("test :x:")
client.run("input token")
@client.command()
异步def测试(ctx,message=“Test”):

Message=wait ctx.send(apme,“我经常喜欢走捷径,所以我个人会这样写:

@client.event
async def on_message(message):
    if message.content == "poll" in message.content:
        mm = await message.channel.send("react to this")
        await mm.add_reaction('\U0001f44d')
 
    await client.process_commands(message) 


@client.command()
async def  poll(ctx,*,polltext):
    mm = await ctx.send(f'{polltext}')
    await mm.add_reaction('\U0001f44d')
    await mm.add_reaction('\U0001f44e')


说我懒,但它很管用XD。

这很管用,我不得不做一些挖掘,我发现你必须使用表情符号

您可以使用相同的概念来生成命令