Relative Content

Tag Archive for pythondiscord.py

“This interaction failed” with no error logs showing up

I want to question how do I fix the error. The problem is; the bot says “This interaction failed” when I select the option on ok_button function. And there is no error logs. Could you resolve my problem? It’s for my project so I really want to resolve this quickly.

Bot allow reaction Y only if reaction X has been added

if user == and str(reaction.emoji) == “U0001F5BCU0000FE0F”: channel = client.get_channel(1245390045859549285) #👜-reward-container # Filter out mention at the start mention_regex = re.compile(r”^<@&(d+)> “) filtered_content = mention_regex.sub(“”, reaction.message.content, 1) print(filtered_content) message = await channel.send(f”{filtered_content} by {reaction.message.author.mention}”) await message.add_reaction(“U0001F5BCU0000FE0F”) Trying to find a way to prevent people from adding this reaction before adding U00002620U0000fe0f first. I came up […]