Relative Content

Tag Archive for pythondiscord.py

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 […]

Discord.py forum threads invalid form body

I’m trying to link my google spreadsheet to a discord forum threads and I have been getting into these errors saying that its an invalid form body for exceeding the character limit of 2000 or 4000 and if I change that, it’ll say that it cannot send an empty message. I’ve gotten it to send out the first message but I’m running into the issue of when it gets to the second message if it needs to.

discord.py get subcommand

I am trying to get the subcommand that the user has called in Bot.process_commands
this was my code

Duplicate Commands for discord.py

I created a discord bot in python, and at first i had it set so that it would sync the commands to a specific guild, but i recently changed it so that it is synced globally, and now there is this bizarre bug which duplicates every command so it appears twice. These are a few of the commands that are duplicated.