Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [discord.py]

'discord.py' is a Python 3.8+ 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]. Please check if all necessary intents are enabled in the code and your Discord Developer Portal.

0 votes
1 answer
64 views

How can I decrypt voice data received from Discord?

I'm trying to decrypt the voice data received from Discord that uses xsalsa20_poly1305 encryption mode. My goal would be to record & use audio to chat with AI. What could I do wrong? Thanks for ...
Peter Till's user avatar
-4 votes
1 answer
32 views

How setup http server on my bot instance?

How do I make requests directly to my bot? For example, I can send any request to the server at any time and receive a response. Is it possible to do this with a bot so that, for example, the server ...
kot_v_palto's user avatar
-1 votes
1 answer
26 views

Selectmenu after button discord.py

I'm developing a discord bot using discord.py. In this block of code, I'm trying to open a select menu after pressing a button. It should go though all available items in .csv file (item is available ...
janp0l_'s user avatar
  • 25
0 votes
1 answer
39 views

How to verify if a member has permission to do a Slash Command

I made a clear slash command, but the bot didn't verify the permissions of the interaction.user. I tried with that @commands.has_permissions(administrator=True), but It's not working since it was ...
Ruka Off's user avatar
-1 votes
0 answers
34 views

discord.py app command error handling won't work because responses take >5 seconds

I'm having this issue where before a few days ago, everything worked fine, but suddenly any error handling will take too long to be in the 3 second time frame for the response to be handled. Nothing ...
JoniKauf's user avatar
-7 votes
0 answers
102 views

Error when I try use Gemini API for my discord bot [closed]

When I try use the command !askai {question}, My code send a error from console. Its looking like this: WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:...
MoonVatality HUB's user avatar
0 votes
1 answer
29 views

Is there a way to manipulate the order of execution of arguments in a Discord.py async function?

First off, I apologize if I am using wrong terminologies on this question. Hopefully, I can come through with the details. I am trying to send files(local images) and embed using the command await ...
J_L's user avatar
  • 3
0 votes
1 answer
48 views

My Discord bot doesn't send message when I type a command

I'm currently developing a Discord bot, but when I call the bot.process_command member function with several arguments, it does not respond and does not give an error message. My code is as follows: ...
Canom's user avatar
  • 1
1 vote
0 answers
46 views

Recording audio with a Discord.py bot

I'm trying to make a Discord bot that forwards sound from one channel to another (with consent from the individuals being recorded). The problem I've encountered is that when multiple people are ...
Pineapple's user avatar
1 vote
0 answers
57 views

Add key and value inside key returns in JSON & Python

I have a JSON file with this format and I'm trying to insert a key and value, as a value to a key. { "A": { "A": "2024-07-17 20:06:35.185784", "B&...
Abraya's user avatar
  • 11
2 votes
1 answer
21 views

commands.check analog for buttons?

I have function that checks whether guild is in the whitelist that I use with commands.check for every my command: async def is_active(ctx): return ctx.guild.id in get_whitelist() Is there some ...
Raffaello Banhammer's user avatar
1 vote
1 answer
38 views

I can't understand why user data isn't being entered into the database

I'm creating a discord bot that will enter user data from the server into the database, such as id, username, nickname and roles. For this I use discord.py and Supabase. It doesn't show any errors in ...
zzhuravleff's user avatar
0 votes
1 answer
38 views

Is it possible to detect if a user has deleted their account?

I am currently making a bot using discord.py, and I'm using a JSON file to hold user information, however, I want it to automatically delete information if an account gets deleted. Is it possible? I ...
Daice's user avatar
  • 3
0 votes
0 answers
32 views

Sending message error 404 Not Found (error code: 10062): Unknown interaction [duplicate]

I encounter this problem while running my discord bot on Pylex(A bot hosting service) I dont know why this error arise since the code run perfectly fine on my pc This is what displayed on my bot's log ...
Nhật Quang Lê's user avatar
0 votes
0 answers
21 views

How to Log in to a Discord Bot with SOCKS5 Proxy Authentication

I am trying to log in to a Discord bot using a SOCKS5 proxy with authentication. Here is the simple code I am using to log in without the proxy: import discord TOKEN = "YOUR_BOT_TOKEN" ...
user26366765's user avatar

15 30 50 per page
1
2 3 4 5
1077