Skip to content

Clear reactions in setting time []

I want clear or disable reactions in setting time using

I making poll command and wanna delete or disable(I dont know can I or not) reactions in setting time

I have code like this

    async def poll(self, ctx, time: int, title, *options):
        await ctx.message.delete()
        if time == None:
            await ctx.send("Укажите время!", delete_after = 5)
        elif title == None:
            await ctx.send("Укажите название!", delete_after = 5)
        elif options == None:
            await ctx.send("Укажите вопросы!", delete_after = 5)

        if len(options) >= 6:
            await ctx.send("Максимальное количество вопросов - 6!")
            time1 =
            time2 = timedelta(minutes=time)
            time_plus = time1 + time2
            time_plus = nextcord.utils.format_dt(time_plus,style = "T")

            embed = nextcord.Embed(color = 0xFFFFFF, title = title, description=f"""
            Опроc закончится в {time_plus}n
            embed.set_thumbnail(url = "")
            if len(options) == 1:
                embed.add_field(name = f"1",value=f"{options[0]}")
                m = await ctx.send(embed = embed)
                await m.add_reaction("1️⃣")
                if == time_plus:
            if len(options) == 2:
                embed.add_field(name = f"1",value=f"{options[0]}")
                embed.add_field(name = f"2",value=f"{options[0]}")
                m = await ctx.send(embed = embed)
                await m.add_reaction("1️⃣")
                await m.add_reaction("2️⃣")

I have my time time_plus and wanna do something when time invoke



You can use reaction.clear or reaction.remove to remove reaction from your message.
Here’s an example to remove specific reaction from user by using on_raw_reaction_add

async def on_raw_reaction_add(payload):
    channel = await bot.fetch_channel(payload.channel_id)
    message = await channel.fetch_message(payload.message_id)
    emoji =

    if != or ==
    if emoji == '1️⃣': #if user react 1️⃣ to your message   
        #do your stuff here
        reaction = nextcord.utils.get(message.reactions, emoji=emoji)
        await reaction.remove(payload.member) #remove the reaction