pycord

Getting all guilds the bot is in and banning the member in all discords

Getting all guilds the bot is in and banning the member in all discords Question: So I am trying to get all guilds that the bot is in. Which I have done by: for guild in self.bot.guilds: guild = guild Using this I need to try and ban the member specified in all of the …

Total answers: 1

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

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

Is there a way to play audio without calling the connect command? (pycord)

Is there a way to play audio without calling the connect command? (pycord) Question: In my implementation whenever I call the play method while the bot is connected to the voice channel, it will throw an error. However, the official documentation, including other videos on the matter, use the same method. The main reason I …

Total answers: 1

How to get mentioned roles ids in slash command pycord

How to get mentioned roles ids in slash command pycord Question: @bot.slash_command(name = "test", description = "testing command") async def test(ctx, mention: discord.Option(name="mention", description="mention.", required=True)): print(mention.mentions.role_mentions) i tried to do this but throws error that says str has no attribute mentions i am trying to get all mentioned roles ids in pycord and got error …

Total answers: 1

How do I add a interaction to a button in pycord?

How do I add a interaction to a button in pycord? Question: I’m getting an error constantly from some code from a couple of years ago that needed fixing. Back then, I didn’t think that comments were useful, so I didn’t make any. Now, I’m getting errors from that piece of code, and I need …

Total answers: 1

AttributeError: 'coroutine' object has no attribute 'edit'

AttributeError: 'coroutine' object has no attribute 'edit' Question: I am making a discord bot: There is an async function that corresponds to a slash command. I have another function called count(): async def count(n): for i in range(n): yield i and in the slash command function: msg = ctx.respond("") for i in count(n): await msg.edit(i) …

Total answers: 2

How do I count the number of messages per day in pycord?

How do I count the number of messages per day in pycord? Question: So I basicly count all the messages in a channel. I also want to count the number of messages per day. I know message.created_at returns a datetime, but how do I count how many times a date is present in this list? …

Total answers: 1

event wait for a specified message using pycord

Event wait for a specified message Question: I’m trying to create an event in a command that will wait for a specified user but it didn’t work : await bot.wait_for(‘message’, check=check("282859044593598464")) if message.author.id == "282859044593598464": I want to specify what the message contains. Asked By: SIDALonpy || Source Answers: Use def check(message): return message.author.id == …

Total answers: 1

discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: OperationalError: near ",": syntax error

discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: OperationalError: near ",": syntax error Question: when I’m trying to remove specific things from my Database (sqlite3) it’s giving me error: discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: OperationalError: near ",": syntax error for some reasons, here’s the needed code: c.execute("DELETE FROM accounts WHERE email=?, password=?", (newresults[0], newresults[1])) By the …

Total answers: 1