How to handle sub commands?
attached are the code for my command handler and the error. It happens when it tries to pass a new command through the handler, which has 2 sub commands. I never used sub commands before so I got no idea how to handle them. What should I change?
registering commands
I'm trying to create a script that registers commands globally but it doesn't work
Premium Button didn't work
Hi, there,
First of all, I haven't found any documentation on how the Premium button works.
Secondly, I have a problem (Expected the value to be a string or number) for the โPremiumโ button type....
Command Not Reloading
Hey, I'm having an issue where, after using the reload command the bot is still referencing the old message. although when I log the event I'm seeing the updated code with the changes I made.
I'm using typescript & CommonJS while transpilng...
Searching discord.js Documentation
I'm trying to make a slash command to get documentation on specific topics on discord.js, however I don't know how lol
```js
const { SlashCommandBuilder } = require('discord.js');
...
Discord permissions
which permission members need to use button on embed message in forum type text channel?
Error in Ticket System MongoDB database log
hi, I had an error with my code that happens when I create a ticket, it is supposed to listen, wait and log the messages to my MongoDB Cluster, but when I run the command to see the logs it's empty, I don't get any error code so I don't know what's wrong, the images are below:
Client won't start
I added client.on('debug', console.log), and this is what I get:
```[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 12...
shardList does not work on my app
I have an app with 28 shards, but i want to manage only 10 shards per host, i already set the shardList option but when i start the app, it spawns all the shards.
File Sending
``js
const transcript = await createTranscript(interaction.channel, {
fileName:
transcript-${interaction.channel.name}.html`,
limit: -1,
returnType: 'attachment',...bulk file downloader
ok so i dont really know how to explain this but heres what i need help making, this is not for a bot
i would like someone to help me make a script that gets all file links in a channel without restriction and uses a webhook to post the discord attachment link into another server that has the webhook...
How to kill a shard and prevent its auto respawn functionnality?
Hello,
I m using the ShardingManager and I want to know how to prevent the shards you kill with shard.kill() to automatically respawn after it? Without restarting the ShardingManager....
can send normal message but cant send embded message
``js
try {
// Send DM to the user with the LeetCode question
await member.user.send(
You have been timed out in ${member.guild.name}. To get your timeout removed, solve this LeetCode question and reply with submission link or screenshot: ${randomLeetCodeQuestion}`,...ping discord
how do i access discord api ping?
code that i tried
```js
const { Client, SlashCommandBuilder, WebSocketManager } = require('discord.js');
...
Error Adding Buttons To Message
I am working on creating an application system for my Discord server, but that is irrelevant to the issue. I am trying to add Flag and Deny buttons to the embed that is sent to the submitted applications channel. Here is my code:
```js
const flag = new ButtonBuilder({
customId: 'flag',...
unable to send message in channel
``// Send DM to the user with the LeetCode question
await member.user.send(
You have been timed out in ${member.guild.name}. To get your timeout removed, solve this LeetCode question and reply with submission link or screenshot: ${randomLeetCodeQuestion}`,
);
const redirectChannel = member.guild.channels.cache.get(config.REDIRECT_CHANNEL_ID);...Message collector not working
I'm configuring my bot so that it will respond to the slash command
/validate
by creating a new thread and asking the user to post their email.
This is my the function that is called when the slash command is invoked.
```js
async function threadSetup(interaction) {...others unable to see slash commands
well i want so when someone execute a slash commands other can also see it but in this case only i am able to see it
``js
await interaction.reply({
content:
Removed timeout for ${member.user.tag}.`,...