#embed

1 messages · Page 1 of 1 (latest)

lyric cloak
#

how to redact the embeds?

await inter.edit_original_response(embed=new_embed)
#

my code not wrking

#

edit embed*

rapid flint
#

send full code

lyric cloak
# rapid flint send full code
        def check2(Reaction):
            print(Reaction.user_id)
            if (str(Reaction.user_id) == str(cap1)):
                return proverka(Reaction.emoji)
        def check3(Reaction):
            print(Reaction.user_id)
            print(cap2)
            if (str(Reaction.user_id) == str(cap2)):
                return proverka(Reaction.emoji)
        await msg.add_reaction('1️⃣')
        await msg.add_reaction("2️⃣")
        await msg.add_reaction("3️⃣")
        await msg.add_reaction("4️⃣")
        await msg.add_reaction("5️⃣")
        await msg.add_reaction("6️⃣")
        await msg.add_reaction("7️⃣")
        await msg.add_reaction("8️⃣")
        reaction = await inter.bot.wait_for("raw_reaction_add", check=check2)
        ff = proverka(reaction.emoji)
        print(ff)
        embed = disnake.Embed(
            description=f"**Team A**\n1) <@{cap1}>\n2) <@{a[ff-1].id}>\n3)\n4)\n5)\n\n**Team B**\n1)<@{cap2}>\n2)\n3)\n4)\n5)",
            color=0x37393d,
        )
        teamafirst=a[ff-1].id
        msg = await inter.send(embed=embed)
        reaction = await inter.bot.wait_for("raw_reaction_add", check=check3)
        print(reaction)
        ff = proverka(reaction.emoji)
        print(ff)
        new_embed = disnake.Embed(
            description=f"**Team A**\n1) <@{cap1}>\n2) <@{teamafirst}>\n3)\n4)\n5)\n\n**Team B**\n<@{cap2}>\n2){a[ff-1].id}.id\n3)\n4)\n5)",
            color=0x37393d,
        )
        teambfirst = a[ff-1].id
        await inter.edit_original_response(embed=new_embed)
#

@rapid flint i tested everything useng print() and its working untill embed edit

rapid flint
#

check must return true or false

lyric cloak
#

thats reaction printed

regal rain
digital anvil
lyric cloak
#

no difference

#

embed

#

not editing

digital anvil
#

check3 doesn't rreturn a bool.

lyric cloak
#

with no args?

rapid flint
#

read again

rapid flint
digital anvil
#

Deja vu

rapid flint
lyric cloak
#

its bool

digital anvil
lyric cloak
#

how to return true

digital anvil
#

It needs to be True OR False

#

Otherwise, it always returns True and the check always passes and the code always execute. At that point, skip the check.

rapid flint
digital anvil
#

I've been saying that for days.

#

Every single issue they've had over the last week could have been resolved had there been at least 2 hours spent learning some Python basics and reading the disnake docs/guide