discord

How to remove a specific reaction from message

How to remove a specific reaction from message Question: I’m making a simple game in discord.py/pycord and I would like my bot to be able to delete a specific reaction on click. Is there a way to do this? Here is the excepted result: Here is my actual code (I’m using pycord): import discord from …

Total answers: 1

Why does my Discord.py Bot spam (and add numbers) in the chat?

Why does my Discord.py Bot spam (and add numbers) in the chat? Question: I am writing a discord bot which job is simply adding, subtracting and suming up numbers. Everything works fine exept when you type "-1" (to subtract a number from the sum) it will spam "-1 was subtracted from your apples. You got …

Total answers: 1

Close Discord message on button click

Close Discord message on button click Question: I have a select menu with a submit button. When submit is clicked I want to close the current message, submit the data and then open a new select menu but I am having trouble figuring out how to have the message close. How can I have the …

Total answers: 1

Fixed pycord project thanks for helping

How can i fix this pycord code project i made? Question: I have a discord bot project. In the following code I made that if you reply a specific word the bot will give you a role. I already created the role but when I try it turn out to a error. I’m using Pycord. …

Total answers: 1

How to edit images in embeds (discord.py)

How to edit images in embeds (discord.py) Question: I have a command that generates a random color palette and it works pretty well. Then I wanted to add a button to it, a button that’d generate a new palette. I added the button, wrote a callback, but the callback just won’t work, because the interaction.response.edit_messsage() …

Total answers: 1

How can i get all the pokémon types automatically with pokeapi?

How can i get all the pokémon types automatically with pokeapi? Question: I’m a beginner programmer, I’m adventuring with APIs and python. I would like to know if I can get all types of pokémon withou passing a number as I did here: import requests name = "charizard" url = f’https://pokeapi.co/api/v2/pokemon/%7Bname%7D’ poke_request = requests.get(url) poke_request …

Total answers: 2

I am trying to make a discord bot in which I want that as soon as user type into command channel his/her discord id must be printed

I am trying to make a discord bot in which I want that as soon as user type into command channel his/her discord id must be printed Question: if message.content.startswith(‘$register’): await message.channel.send(‘You are registered successfully’) userk = print(client.user.id) I am using Discord.py and Iam trying to get the Discord user id of a user when …

Total answers: 2

Discord bot not running code or responding

Discord bot not running code or responding Question: this code is meant to run whatever code is inputted with a command into a computer i have no errors and the test message works but it doesn’t run the code in the computer when input with the command and it doesn’t respond with the message "Code …

Total answers: 1

How can i make my discord.py bot kick command optional reason section to a required reason?

How can i make my discord.py bot kick command optional reason section to a required reason? Question: @bot.tree.command(name="kick", description="Kicks specified user from the server.") async def kick(interaction: discord.Interaction, member: discord.Member, reason: Optional[str] = None): if interaction.user.guild_permissions.kick_members: await member.kick(reason=reason) embed = discord.Embed(title="Successfully Kicked.",description=f"{member.mention} has been successfully kicked off the server.nFor {reason} reason.", color = discord.Color.green(), timestamp …

Total answers: 2