Questions tagged [discord.py]

Python 3.5.3+ library for interfacing with the official Discord API. This tag should only be used when referring to the discord.py library. If using the [nextcord] or [pycord] fork, please use these tags instead if the question refers to them specifically, otherwise please use both the fork's tag and [discord.py].

0
votes
1answer
22 views

Invalid syntax in discord bot python

I have made a discord bot in python which works fine. But now i wanted to implement a bad word filter. The bot will warn the person if he or she says a bad word. I also want it to be embedded. The ...
0
votes
0answers
16 views

Running Python File Produces Different Result When Inside Swift App

I'm making a Swift app for Mac that uses discord.py to work with discord and send messages. This means that it has to run python in the bash shell from within the swift code. When I run this code from ...
0
votes
0answers
12 views

Interaction Menu Problems d.py

i simply have a problem with the interaction menu in my bot. If i do the command *help (which calls the interaction menu) everything goes fine. After i selected the first option, for example i wanna ...
-1
votes
0answers
16 views

User.mutual_guilds returning an empty list

I decided to code another bot, but this time I coded it with an on_message support function. It worked perfectly fine until I decided to let the user choose which Server the problem relates to. So, i ...
0
votes
1answer
14 views

Have an error with nextcord slash commands

So i am trying to add a support to a slash commands but for some reason it says: AttributeError: 'NoneType' object has no attribute 'delete' its mostly coming from await ctx.message.delete(ctx.delete) ...
-1
votes
0answers
14 views

warning system using discord.py and postgresql asyncpg error

so i was using asyncpg and postgresql to make a warning system using discord.py and ran into this error error: Traceback (most recent call last): File "C:\Users\\discord bot\venv\lib\site-...
0
votes
0answers
15 views

py-cord button not working even after being defined

so i am trying to run this code in repl.it after installing py-cord but it gives the following error if message.content.startswith('$vote'): vote = discord.Embed( title= message.author....
0
votes
0answers
23 views

Closed Pycharm without disconnecting, and discord bot still running

I am a new programmer, trying to make a discord bot with python. Today I closed PyCharm, and did not close the running program first. As soon as I did that, the discord.py bot was still running in ...
0
votes
1answer
38 views

Warn command discord.py postgres sql error

So i made a warn command from a youtube tutorial for my discord bot from https://www.youtube.com/channel/UCBwVvFWzp01YMD9ibqhSkEg and i got this error data = await self.bot.db.fetchrow("SELECT * ...
1
vote
1answer
26 views

How to make my discord bot send an emoji if a message has a emoji in it?

I am trying to make my discord bot send an emoji whenever the message has an emoji in it. With my code it does even throw back and error, and does not send a message to the guild. import discord ...
0
votes
1answer
17 views

How to send a dm with invite link to any user outside of the server with discord.py?

I want to make a discord bot using discord.py that will invite users outside of the server to the server using their ID? Is there any way I can do it? So far I've only got this. import discord from ...
0
votes
0answers
22 views

How to embed gifs sent from the discord client itself?

I am making a private bot and in the snipe command, the owner wants the gifs deleted to be embedded as well. The problem however is that embed.set_image() only sets the image when the link has a .gif ...
1
vote
0answers
41 views

Get sub-function from a call

Is there any way to get the sub-function called in the original function? I don't really know how to explain so I have some code related to the idea def foo(): #get the sub function '.bar' run....
0
votes
1answer
18 views

Prevent commands during client.wait_for() discord.py

I've encountered a problem with client.wait_for(). while True: msg = await client.wait_for('message', check=lambda message: message.author == ctx.author) While running an infinite loop, when I ...
0
votes
1answer
18 views

How to store data from a command and load it discord.py

im working on a discord bot and it has a command called "addtoken" that asks for a name and a contract, and it adds the token to a Dict. But i want to store that added tokens so when i start ...

15 30 50 per page
1
2 3 4 5
925