discord buttons discord py

56 Views Asked by At
class StaffView1(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None)
        self.bot = bot

    @discord.ui.button(label="▶️", style=discord.ButtonStyle.blurple, custom_id="Staff")
    async def userprofile(self, interaction, button):
        member = self.bot.get_user(1012409057119846512)
        embed = discord.Embed(
            description=f"<@{member.id}>"
                        f"\n{member.name}",
            color=0xe67e22)
        embed.set_thumbnail(url=f"{member.avatar}")
        await interaction.response.send_message(f"<@&985560526258045012>", embed=embed, view=StaffView1())

i used the same one for slash command and it worked dont kno why this codnt work the same

press the button bt get all kind of errors it shod edit the message with a new user

1

There are 1 best solutions below

1
sicco14 On

You could try:

member = interaction.guild.get_member(1012409057119846512)