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.
discord.py
16,147
questions
-1
votes
0
answers
9
views
How to make a discord bot join my voice channel using interaction (slash commands) (Python)
@client.tree.command(name = "join", description = "Makes the bot join your voice channel.")
async def join(interaction: discord.VoiceChannel):
try:
if interaction....
1
vote
0
answers
36
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&...
0
votes
0
answers
16
views
Python Playwright - text_content not retrieving expected text [closed]
I have a Discord bot with Playwright Python that I am attempting to use to scrape a website for a numerical value in the footer of a webpage.
The HTML of the footer is as below:
<footer class="...
2
votes
1
answer
15
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 ...
1
vote
1
answer
29
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 ...
-1
votes
0
answers
21
views
Does anyone know of any discord bot hosting that can use FFmpeg? [closed]
I am developing a discord bot that streams radio, and that is why it uses FFmpeg. The bot works well because it uses the FFmpeg installed on my PC, but as is obvious on a host it will not be able to ...
0
votes
1
answer
30
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 ...
0
votes
0
answers
28
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 ...
0
votes
0
answers
26
views
Fix the previous and next song functionality in the Discord bot.py script
I'm a fairly new developer and have always wanted to make a discord bot. So the problem is that in the next function it plays the last song from the queue not the next one which I don't want, next is ...
0
votes
0
answers
10
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"
...
0
votes
0
answers
21
views
Connecting Discord and Telegram Accounts
So I am currently working on a way to link your discord user ID and telegram user ID into my mongoDB, in python. I currently have it so in discord I create a button that the user can click on and get ...
0
votes
0
answers
29
views
Pyinstaller: problem with imports and reading/writting files
I am creating a discord bot for a, private, small server, with friends. I would like the bot to be runable by any of my friends, none of whom know much about programming.
My idea was to bundle it up ...
0
votes
1
answer
17
views
discord.py - Voice Client not playing source
I was recently creating a Discord Bot and wanted to create a /effect boom command. After running the command, the client joins the channel and should play the specified source in the code.
I don't ...
-1
votes
1
answer
41
views
Python Discord Bot: Github broke my bot's start command
I'm working on a discord bot in python in Visual Studio Code. I went on vacation about a week ago and uploaded my current code to github before I left with the intent of working on it when I had some ...
0
votes
1
answer
46
views
How to pass context from a command to the callback in discord.py
Partially Finished Product
So, essentially, I am trying to create a discord bot that will allow a staff member to request a role. That request will then be sent to an admin-only text channel with a ...