Questions tagged [discord]
For use with the Discord API, which provides an interface that allows you to program bots and other applications for Discord messaging services. If asking about a specific API wrapper, please tag the library as well.
20,525
questions
-1
votes
1
answer
20
views
Discord.py Button
I recently wanted to make an Ticket Bot. It worked but now for no Reason It won't work.
I am not the Best in Programing and Typing so please don't judge me on it!
Heres the Code:
class ticket_info(...
-4
votes
0
answers
16
views
invite bot only if they bought a product discord.py [closed]
I want to make a paid discord bot.
Whenever someone invites the bot, detect who invited it and if they dont have the role in the main guild the bot will send a dm and leave the server
guildid = int
@...
0
votes
0
answers
21
views
How to set admin perms for lock/unlock
if not interaction.user.guild_permissions.manage_channels:
await interaction.response.send_message("You dont have permission for this command", ephemeral=True)
I don't know what to ...
-1
votes
1
answer
15
views
Please resolve the discord is not defined error in the discord.js file
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
})...
-1
votes
0
answers
6
views
discord.app_commands.errors.CommandInvokeError: Command 'movie' raised an exception: TypeError: object of type 'NoneType' has no len()
i keep getting this error when trying to run my command on a discord bot, where when you run the code, it outputs and sends a image of a poster, which is custom made with another script any helps ...
-3
votes
0
answers
21
views
How i can add members from one server to other [closed]
I am getting error while adding members from on server to other server using discord js latest version
Invalid Form Body DiscordAPIError[50035] access_token[BASE_TYPE_REQUIRED]: This field is ...
-2
votes
0
answers
15
views
v14 print command to bot
I made a command for my discord bot, in this command, the bot will write the same text that the user writes to the channel, but there is an error and I cannot solve it, can you help me?`
const Discord ...
0
votes
0
answers
15
views
I'm getting the error "queue.on is not a function" in the "discord-player" library
I ran into this error while making the VC automatically exit if there are no people or there are no songs in the queue.
I confirmed that there were no problems with other codes, and also checked the ...
0
votes
1
answer
21
views
DiscordJS v14 guildMemberAdd Event doesn't send the embed
When I run my bot and someone joins, nothing happens.Why nothing happens?
Event file:
`const { EmbedBuilder } = require('discord.js')
module.exports = {
name: "guildMemberAdd",
/**
* @param ...
-1
votes
2
answers
17
views
DiscordJS v14 member.guild.channels.cache.fetch is not a function
i'm coding a welcome message, that sends automaticly, when someone joins. But when someone joins, an error happens.
index.js
require("dotenv").config()
const fs = require("fs")
...
0
votes
1
answer
18
views
Problem with discord bot, cogs dont wanna work
import os
import disnake
from disnake.ext import commands
bot = commands.Bot(command_prefix=".", help_command=None , intents=disnake.Intents.all())
@bot.command()
@commands.is_owner()
...
1
vote
0
answers
49
views
Repeating code works for a certain amount of time and then breaks
I've made a simple discord bot with Python that tracks how long people are in a specific set of channels for one hour every day. Essentially, it's an attendance tracker for my gaming group that has an ...
0
votes
0
answers
12
views
Heroku can't uninstall discord.py
I'm currently coding a discord bot using Nextcord (which is a fork of discord.py library), yet they're not compatible with one another.
The bot is hosted on the Heroku platform, and in the logs, every ...
0
votes
0
answers
13
views
Saving a value that's changing based of the command a person uses in the discord bot
I'm making a custom and simple discord bot that needs to store the Gold, equipment and etc. that our guild (DnD) collects. and I really don't want to use databases. is there a way to store the values ...
-1
votes
0
answers
18
views
How to make a payment via discord.py in python
Good time of the day. I need to implement payment in discord via any payment system in python
After looking through the information on the Internet, I did not find any documentation for my problem. ...
-1
votes
0
answers
43
views
Discord keeps blocking my extension that blocks search bar
I am making an Chrome extension to block search bar on Discord to prevent myself from accessing NSFW discord channels, I already blocked the URL of those Discord channels as well as download link to ...
1
vote
1
answer
43
views
Read/write for different key-pairs in the same dicitonary at the same time will have race condition?
Basically I have one single python dictionary for people to read/write, let's call it diction ary a, and I have two async functions to do actions about this dictionary: write and delete.
The ...
0
votes
1
answer
18
views
Discord bot permissions not working as intended
I am trying to write a simple discord bot that queries through a movie database and returns the results based on the search query made by the user. Issue is I can't seem to figure out the required ...
-2
votes
0
answers
39
views
Python waiting room discord bot
I wrote the following code for the bot. But he has two problems
The bot connects to all voice chats, that is, it completely ignores the ID I gave it.
Constantly throws the error
raise ClientException(...
-3
votes
0
answers
44
views
discord.py leveling and sqlite
# Initialize a new SQLite database connection for user levels
level_conn = sqlite3.connect('level_data.db')
level_cursor = level_conn.cursor()
# Create a table to store user levels if it doesn't ...
1
vote
1
answer
32
views
Why isn't my discord bot answering when I type the command?
So im doing a python discord bot using discord.py library and it worked perfectly until I tried to switch on a version of the code using the slashcommands. I have no error at all in the logs...
Here ...
0
votes
0
answers
27
views
Skipping extractors execution since zero extractors were registered (Use `node --trace-warnings ...` to show where the warning was created)
I'm following a Discord Music Bot tutorial that uses ffmpeg, here is index.js
require("dotenv").config();
const { REST } = require("@discordjs/rest");
const { Routes } = require(&...
-1
votes
0
answers
54
views
"Only iterables may be used in a ListType": Discord Webhook + Google Apps Script Error
I have a Google Form I'm trying to attach a Discord webhook to in order to push a message to a Discord channel every time someone completes the form. So far this has worked good, I can push a message ...
-1
votes
1
answer
25
views
What should be my plan for building a Chat App in Android?
I would like to build an Kotlin-Android Chat App somewhat like Discord (in terms of functions).
I plan to have a login and register system with a "Remember Me" and sign in with Google, Email,...
0
votes
0
answers
22
views
discum reads embed and clicks
def start_bot(token , channelID , user_id ):
bot = discum.Client(token=token)
@bot.gateway.command
def anigame2(resp):
if resp.event.message or resp.event.message_updated:
...
-1
votes
1
answer
44
views
How to fix an offline Discord bot?
I have been trying to learn how to make commands in discord using python. When ever I run my code i get a message that tells me the bot is ready, but it never appears online. yes I have a .env file ...
0
votes
0
answers
14
views
discord js messageCollector giving out empty content
Im trying to make a ticket system with my bot. It first sends an embed with a bit of information and 4 buttons attached. When pressing a button the bot should send a message to which the user should ...
1
vote
1
answer
36
views
AttributeError: module 'discord.ext.commands' has no attribute 'OptionChoice'
im trying to create a discord bot with slash commands, and when I tried to incorporate more complex sections in my command (E.g: /online [server]) I knoew I needed the module "Options". ...
0
votes
1
answer
44
views
Method of viewing both the contents of a Discord reply and the message replied to?
I'm new to Discord bot making, however I'm fairly familiar with commands such as on_message and have a simple bot running at the moment that gives movie recommendations from a list when asked.
In the ...
0
votes
1
answer
21
views
discordjs If attachment is not in the list, remove the attachment
I am developing a plugin and this is where I'm stuck. If one of the attachments uploaded more than once is not an image or a video, I try to remove the ones that are not, but I could not find any way ...
-1
votes
0
answers
19
views
Discord Presence in VsCode is not working properly
So I've downloaded the vscode extension the discord presence, when im openning the vscode its not automatically working, when im openning the setting for this extension it works and shows that im ...
-1
votes
1
answer
36
views
How do I shorten a discord.py close bot code with 3 people as owner?
How do I make this code shorter and only so 3 people with specific uuids can do the command?
I've tried the brackets with 3 uuids separated by commas / or
it still doesn't work and this is the only ...
0
votes
0
answers
8
views
Discord bot how to assign role in python
I tried to find information online, but all assign role discord bot are reaction verification instead of specific human verification. I want to add the code which will assign the role Student with the ...
0
votes
1
answer
59
views
Discord Bot To Send A Message At A Certain Time
I am attempting to create a discord bot that sends a message in a server everyday at 8:00am local time with information about temperature, rain percentage, etc.
I am having trouble coming up with a ...
0
votes
2
answers
34
views
Random Message v14
My code
I want my Discord bot to send the following text message to one of the random text channels on the servers it is on, it doesn't give an error but it doesn't work, I'm new to this,So I don't ...
-2
votes
0
answers
48
views
installing phyton discord bot with many difficulties
I'm trying to install this discord bot from GitHub https://github.com/m4xic/tiktok-tts-discord
this is my first time using phyton so everything was just set up like 5 hours ago. also have installed ...
0
votes
0
answers
10
views
Nextcord - Nextcord.client - INFO - Got a request to RESUME the websocket
I use Python with the Discord library called Nextcord.py
I have this INFO when building my discord bot...I wanna know if it's a problem from my bot or a warning. If it is possible, how to remove it ?
0
votes
1
answer
42
views
howcome my python music discord bot sounds so bad?
I am coding a music discord bot using discord.py and YT_DLP. For some reason, the audio is distorted when I play the audio source to discord voice channel. This is part of my code:
`
@bot.command(...
-1
votes
1
answer
34
views
How can a Discord bot be made to accept commands sent by a webhook? (Python)
I have a python Discord bot that has several commands, and also has a webhook that sends information from a third-party service. However, the Discord bot ignores the commands entered by the webhook, ...
0
votes
1
answer
39
views
Discord.py - Why can't I edit someone else's message?
I'm working on a channel encrypt command and when I go to execute it I get an error saying forbidden 403: cannot edit a message authored by another user how do I fix this or is it even possible
async ...
1
vote
1
answer
25
views
Discord bot cannot find text channel name or channelid
I appreciate anyone who is willing to look at this. I'm trying to have my bot be able to look at a website and take data from that website and post it to my discord channel. I will try to post ...
0
votes
2
answers
38
views
how to properly install a python module , i'm having issues in it
I want to set up PyNaCl for a discord bot project , but I'm having trouble installing it.
when i simply use
$ pip install pynacl
it does say the module pynacl is installed successfully, but when i ...
1
vote
1
answer
13
views
Contextmenu modal interaction collector error
I have a bot like this that I wrote to give this warning, but after a while the bot goes offline and gives this error. I tried different ways to solve it, but even though I tried, I couldn't get any ...
0
votes
1
answer
19
views
"Expected the value to be an object, but received string instead" with slash commands using discord.js
I'm trying to make an economy bot on Discord. I finished with the embeds and ActionRows for the transfer part; however, when I do try to run the /transfer command; I get:
Expected the value to be an ...
-1
votes
0
answers
32
views
Adding Cooldown to Discord.py Slash Commands Not Functioning as Expected
I'm currently working with Discord.py's slash commands and attempting to implement a cooldown on these commands. According to the documentation, I have applied the following code snippet to set up a ...
0
votes
1
answer
23
views
How to create top level error handling in Discord.js
Sometimes the bot are having some unexpected error, while the bot are already on live and I don't have the log every moment. Which makes me don't know where the error is occurring from. Therefore, I ...
0
votes
1
answer
29
views
Discord.py Cogs/Tasks API: Why Do I have to manually start tasks after starting them in my __init__ function?
I've been stuck trying to get scheduled tasks for a discord bot I want to build up and running. Incase my scheduling was causing issues I decided to just do the timed task because has less outside ...
0
votes
0
answers
21
views
Traceback on discord.py
Traceback (most recent call last): File "path_to_folder\Python-Discord-Bot\src\python\main.py", line 4, in <module> from discord import File ImportError: cannot import name 'File' from ...
-2
votes
1
answer
23
views
Check if member is in private voice channel or check if bot doesn’t have perms to join private voice channel and send error discord.js
Im making a music bot and i need to make an error that check if the member is in a private voice channel or if the bot doesn’t have perms for joining the private channel
I have tried this code:
...
0
votes
1
answer
38
views
submit Modal information Discord.js v14
Hy, i try to retrieve information of modal in discord.js i follow this doc : https://discordjs.guide/interactions/modals.html#responding-to-modal-submissions
I try to follow the doc, i try tutorial of ...