20,715 questions
Best practices
0
votes
3
replies
36
views
Recommended workaround for circular import issue?
I am learning python (fairly new) and decided to create a simple rock paper scissors bot as a mini side project to apply the lessons I've learned.
I have encountered an issue during my development:
...
0
votes
0
answers
41
views
ModalBuilder throws “Received one or more errors” when using new v14.25.1 modal API (LabelBuilder, addTextInputComponents…)
I'm currently working on my first modal in a Discord bot using discord.js v14.25.1, and I’m trying to follow the latest documentation (which includes the new LabelBuilder, addLabelComponents, ...
5
votes
1
answer
131
views
Discord command not showing when bot is up
I'm working on a discord bot using discord.py==2.7.0a5350+g8f2cb607.
This bot is deployed in a single server and will not be deployed anywhere else.
I've my on_ready() function like this :
@bot.event
...
Advice
0
votes
0
replies
33
views
Website [BOT LISTING] - Show Avatar of Discord Bots
The issue with Discord's CDN is that it doesn't delete old assets. I check on my side whether the asset is still valid, and only if it's not, I fetch the new one. The problem is that the old asset is ...
0
votes
1
answer
56
views
voiceStateUpdate oldState Channel ID always null
I would like to add a join-to-create function to my Discord bot, whereby a temporary channel is created when a user enters a specific channel. As soon as the user leaves the channel, the temp channel ...
0
votes
1
answer
114
views
Channel not found with Java API
I want to send from Java BE messages to Discord server. I tried this:
public class DiscordTest {
private final String token = "......";
private final String channelId = "...
-2
votes
1
answer
124
views
on_member_join & on_member_remove event triggers are not working or showing errors
Everything else works, escept the member join and member leave event functions don't trigger at all once i have member join/leave. I have all intents turned on in my developer portal and i have the ...
1
vote
1
answer
94
views
Why doesn't my timeout command take time correctly?
I am trying to make a timeout command for my Discord bot, but I need help with parsing time.
The command is supposed to go like +timeout @member 2d 3h 40m but it just takes the 2d, times out the user ...
0
votes
1
answer
233
views
Bot gets "Unclosed connection" when joining a voice channel for the first time
I am building a Discord bot using py-cord.
When the bot tries to join a voice channel for the very first time in a server, I immediately get the following warning in the console:
Unclosed connection
...
1
vote
1
answer
63
views
Discord.js "guildMemberUpdate" event only fires the second time i change a Nickname
The Issue:
I wanted to create a feature where the bot sets a certain prefix before the Nickname fitting my discord server theme if a user decides to change it. I'm allowing the users to change their ...
0
votes
1
answer
98
views
Markdown Table Displays Correctly in Console but Misaligned in Mezon
I am working on a C# application that generates a Markdown table to summarize project timesheet data. I want to send it to a Discord like platform called Mezon. The table displays correctly (with ...
0
votes
1
answer
53
views
Why does my Discord bot give me a KeyError when I run the join voice channel command?
I'm coding a Discord bot in Discord.py and currently I'm working on the music features. The join command isn't working properly.
This is the code so far:
import discord
from discord.ext import ...
2
votes
1
answer
48
views
Unable to convert data of Discord Command to JSON
I'm trying to create a discord bot with a slash command. I already verified that the command does exist, by running console.log(client.stores.get('commands'));. However, when I tried converting the ...
0
votes
1
answer
91
views
How can I index search a JSON file with different elements in Python [closed]
In this python script I am trying to randomly access one of the components in this JSON file, however I repeatedly receive a "Keyerror".
Here is the code:
import json
def genCard():
...
1
vote
0
answers
100
views
How to Get the Option Names in Discord.js
Inside the Register Command File
I want to assign credits to each action using the value parameter and ensure that users don't select the same action multiple times. However, since value is not a ...
2
votes
1
answer
78
views
Translating bot.tree.commands
I saw this in several bots and I also wanted to test it on my own, that when bots had a simple bot.tree.command command such as /play, the further parameters of this command, i.e. description and its ...
2
votes
1
answer
61
views
Pycord cog loading gives TypeError: object NoneType can't be used in 'await' expression despite using async setup
I'm writing a Discord bot using Pycord, and I'm trying to dynamically load cogs with an async def setup(bot) method.
Here's the relevant part of my main.py:
async def main():
for filename in os....
-1
votes
1
answer
87
views
How can I make a bot command to perform an action with another user? [closed]
I want to perform an action using a slash command, for example /hug @dean and then have it mention this user and send a message in an embed that should be random.
What I tried either doesn't get a ...
0
votes
1
answer
45
views
How to do discord OAuth2 in a request session?
(From the user side not the bot) I don't know how to go about this and I would like some help.
I tried it myself but got this error
[01:19:41] Rover login failed: 400 | {
"errorCode": &...
0
votes
1
answer
90
views
Bot translator in discord
I was trying to create a bot in discord that would perform the function of double translation in voice channels, this code is written through the deepseek neural network. I ran into such a problem ...
0
votes
1
answer
124
views
Discord intents.message_content
So I'm building a bot to learn and practice but I'm getting:
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged ...
0
votes
0
answers
45
views
Out of range error (tuple) slash commands Discum
cannot manage to fix out the code below which triggers me an tuple at line 22 which is the SlashCommander part. Even tried to look it up on slash.py to no avail.
If anyone has any idea. I tried many ...
0
votes
0
answers
53
views
Ping user slash command
Im working on implmenting a slash command for "Turn Tracking" with a bot, what i want to happen is for the Bot to mention the next person and that person receive an alert when its their turn,...
0
votes
1
answer
64
views
on_login function not getting executed in flet auth
I am trying to create a login using discord oauth in flet.but the on_login function is not getting executed
my imports:
import os
import flet
from flet import ElevatedButton, Page
from flet.auth ...
1
vote
1
answer
272
views
Discord API returns 403 'internal network error' (Code 40333)
I am developing a Discord bot using Google Apps Script. The bot's primary function is to post an approval message as a reply in a channel and then immediately add a '👍' reaction to its own message.
...
-1
votes
1
answer
58
views
Discord bot /interactions commands structure definition
I am creating a Discord bot to collect user information when joining a community by prompting the user to provide the required profile data.
I have the following command:
const JOIN_COMMAND = {
name:...
1
vote
1
answer
117
views
Discord notification content empty with components V2
When using new messages components (IS_COMPONENTS_V2), Discord sends an empty (mobile) notification for such messages.
It is not mentioned anywhere in the docs
https://discord.com/developers/docs/...
1
vote
1
answer
156
views
How to make a confirmation prompt with buttons with a discord bot in discord.py?
I have a few commands in my discord bot that I'd like to ask for confirmation before running. Something like this example:
@tree.command(name='test')
async def testCommand(interaction: discord....
0
votes
1
answer
121
views
Discord.js: Trying to register commands globally across DMs. Commands show on Servers and DM with bot, but not on other DMs
I'm trying to get a Discord bot that has convenient commands across people's DMs (Like ESMbot). I coded it with the Discord.js module. However, I tried registering the slash commands and it appears on ...
1
vote
1
answer
179
views
Discord py slash command only visible to certain people
I've seen a few discord bots that have 'hidden' commands available to only server owners. I have searched the internet on how this but so far it's eluded me.
I know I can add checks, but this doesn't ...
0
votes
1
answer
85
views
Assistance for detecting when discord automod is activated (discord.py)
I have a automod setup on my discord server. I want to expand the automod on the discord, and I setup my bot to detected, yet I cannot find any sort of documentation. Or anything to detect the automod
...
1
vote
1
answer
69
views
How do I get my discord bot to accept two roles for a command?
This is my code
@bot.command()
async def modcmds(ctx):
role = discord.utils.get(ctx.guild.roles, name="🎉 Event Staff Team")
if role in ctx.author.roles:
embed = discord....
1
vote
1
answer
46
views
Trying to get my discord bot to log a command and who has used it
Here is my code.
@bot.command()
async def ping(ctx)
embed = discord.Embed(title = "Bot Latency", description=f"Latency: {round(bot.latency * 1000)}ms")
await ctx.reply(...
-2
votes
1
answer
44
views
Discord NodeJS Show Modal When Validation Fails
I've been trying to get a new modal to appear with the same content after validation fails. In this context, I've wanted to force the user to input a number. Since it seems there's no way to do this ...
0
votes
2
answers
48
views
Discord bot @on_message_delete caching messages
For some time now I have a problem with on_message_delete, when a message is deleted, on_message_delete is called, unless the message is not in the cache, i.e. it was sent, the bot was restarted and ...
0
votes
0
answers
308
views
discord.py "Unknown Webhook 10015" since new router
Ever since getting my new router (HG8147X6) I seem to have constantly run into an issue with my Discord.py bots.
After starting the bot, every slash command works once, then all of them fail (I get ...
2
votes
1
answer
76
views
Discord bot function failing
I'm rather new to coding but I've been following this tutorial to a t so far (https://www.youtube.com/watch?v=YD_N6Ffoojw) yet the discord bot I'm coding refuses to run? I thought I had finally ironed ...
1
vote
2
answers
84
views
Two different `InteractionResponseType` enums when using `discord-interactions` in TypeScript
I am relatively new to TypeScript. I am writing a Discord bot using types from the discord-api-types library (I have imported discord-api-types/v10 as DAPI), using the "HTTP Interactions Endpoint&...
1
vote
0
answers
80
views
How to query Discord's well known configuration endpoint directly from Firefox?
I am trying retrieve a user's profile from the front-end from various oauth2 sources. For Discord, the server refuses to process the request, resulting in a CORS error.
I already have my flow ...
-2
votes
1
answer
52
views
I'm trying to read when one of my users bumps the server with discous or disboard
client.on("messageCreate", async (message) => {
const guildId = message.guild.id;
const userId = message.interactionMetadata.user.id;
const messageType = message....
1
vote
1
answer
126
views
Slash command not responding and error when I use defer() or response.send_message (python)
I’m working on a Discord bot using Python & discord.py and facing an issue with defer() and send_message() in my slash commands. Every time I use a command, it returns "The application did ...
0
votes
1
answer
122
views
Discord API data type for id
Currently Discord has approximately 1.360.000.000.000.000.000 (1.36 * 10^18) IDs used up and a long can store integers up to 2^63 - 1, which is approximately 9.22 * 10^18.
My question now is if I ...
-1
votes
1
answer
69
views
Discord bot can't send message to User in DM
I've created a new bot. Created a server, where I and my bot are.
Run a simple code.
Example
package main
import (
"fmt"
"log"
"github.com/bwmarrin/discordgo&...
-1
votes
1
answer
215
views
Does Py-cord support Discord's new User Install Commands feature? [closed]
I recently learned that Discord has updated with a feature called "User Install" that allows users to install bots to their personal accounts, not just servers. As I understand it, this ...
0
votes
1
answer
320
views
Unknown Guild error when retrieving Guild (Server) from Discord's API
I'm trying to retrieve the details of a Discord Server:
curl -X GET -H "Authorization: Bot mytoken" -H "Content-Type: application/json" https://discord.com/api/guilds/...
-2
votes
1
answer
65
views
discord.js: the bot isnt loading my function (login) even tho i made it very clear in the code what to do ( typeError ). how to fix this? [duplicate]
I tried so many different approaches, both in the index.js file as well as in login.js and loginAluno.js, but the login function always shows errors, and I get the following error:
TypeError: ...
-4
votes
2
answers
83
views
Discord.py, commands.error: "roll" not found
I just started studying Python this week and I don't understand what I'm doing wrong. My discord bot is online, but every time I try to type a command in Discord it pings back to VS Code as
"...
1
vote
0
answers
58
views
Trying to do discord auth without getting "CSRF Warning! State not equal in request and response."
Okay so I'm making my first ever desktop app using Electron and FastAPI but I've ran into a road block. I don't know if it's because I use Ubuntu as my main OS or I'm actually doing something wrong. I'...
0
votes
0
answers
31
views
Issues with `setRulesChannel` and `setPublicUpdatesChannel` Not Updating Guild Object in Discord Library im creating
I'm developing a custom Discord JavaScript library, and I am encountering an issue when trying to update the rulesChannelId and publicUpdatesChannelId fields of a Guild object using the ...
0
votes
0
answers
35
views
Discord Rich Presence - How to initialise client on Angular Web App
I would like to set up rich presence for an Angular Web application (Standalone).
Exactly like spotify is doing.
What to use ?
In official documentation is only presented game engine integration
The ...