Martoz
Martoz
DIAdiscord.js - Imagine an app
Created by Martoz on 5/19/2024 in #djs-questions
An invalid token was provided.
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
^

Error [TOKEN_INVALID]: An invalid token was provided.
at Client.login (E:\MartozAi\node_modules\discord.js\src\client\Client.js:237:52)
at Object.<anonymous> (E:\MartozAi\index.js:77:8)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
[Symbol(code)]: 'TOKEN_INVALID'
}
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
^

Error [TOKEN_INVALID]: An invalid token was provided.
at Client.login (E:\MartozAi\node_modules\discord.js\src\client\Client.js:237:52)
at Object.<anonymous> (E:\MartozAi\index.js:77:8)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
[Symbol(code)]: 'TOKEN_INVALID'
}
I have already recreated the token several times, changed everything and everything exactly gives an error
27 replies
DIAdiscord.js - Imagine an app
Created by Martoz on 5/10/2024 in #djs-questions
This interaction failed
const handleTicketCloseButtonClick = async (interaction) => {
console.log('Нажата кнопка Закрыть тикет');
try {
const ticketChannelId = interaction.message.channel.id;

const ticketChannel = await interaction.guild.channels.cache.get(ticketChannelId);

if (ticketChannel) {
await ticketChannel.delete();
console.log('Секретный чат успешно удален');

} else {
console.error('Не удалось найти тикет-канал для удаления.');
}
} catch (error) {
console.error('Произошла ошибка при удалении секретного чата:', error);
}
};
const handleTicketCloseButtonClick = async (interaction) => {
console.log('Нажата кнопка Закрыть тикет');
try {
const ticketChannelId = interaction.message.channel.id;

const ticketChannel = await interaction.guild.channels.cache.get(ticketChannelId);

if (ticketChannel) {
await ticketChannel.delete();
console.log('Секретный чат успешно удален');

} else {
console.error('Не удалось найти тикет-канал для удаления.');
}
} catch (error) {
console.error('Произошла ошибка при удалении секретного чата:', error);
}
};
7 replies
DIAdiscord.js - Imagine an app
Created by Martoz on 4/15/2024 in #djs-questions
pls help fix error
D:\mercury\discordBotv13test\node_modules\discord.js\src\client\Client.js:548
throw new TypeError('CLIENT_MISSING_INTENTS');
^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
at Client._validateOptions (D:\mercury\discordBotv13test\node_modules\discord.js\src\client\Client.js:548:13)
at new Client (D:\mercury\discordBotv13test\node_modules\discord.js\src\client\Client.js:76:10)
at Object.<anonymous> (D:\mercury\discordBotv13test\event\voice.js:51:16)
at Module._compile (node:internal/modules/cjs/loader:1375:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Module.require (node:internal/modules/cjs/loader:1234:19)
at require (node:internal/modules/helpers:176:18)
at readCommands (D:\mercury\discordBotv13test\index.js:45:29) {
[Symbol(code)]: 'CLIENT_MISSING_INTENTS'
}

Node.js v21.5.0
D:\mercury\discordBotv13test\node_modules\discord.js\src\client\Client.js:548
throw new TypeError('CLIENT_MISSING_INTENTS');
^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
at Client._validateOptions (D:\mercury\discordBotv13test\node_modules\discord.js\src\client\Client.js:548:13)
at new Client (D:\mercury\discordBotv13test\node_modules\discord.js\src\client\Client.js:76:10)
at Object.<anonymous> (D:\mercury\discordBotv13test\event\voice.js:51:16)
at Module._compile (node:internal/modules/cjs/loader:1375:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Module.require (node:internal/modules/cjs/loader:1234:19)
at require (node:internal/modules/helpers:176:18)
at readCommands (D:\mercury\discordBotv13test\index.js:45:29) {
[Symbol(code)]: 'CLIENT_MISSING_INTENTS'
}

Node.js v21.5.0
16 replies
DIAdiscord.js - Imagine an app
Created by Martoz on 3/3/2024 in #djs-questions
embed
Is it possible to make a text with a link in the title, but so that it is not blue but white?
24 replies
DIAdiscord.js - Imagine an app
Created by Martoz on 2/16/2024 in #djs-voice
for some reason, the commands stopped registering
today I decided to add commands to the bot , I wrote a command, I launch the bot to test it , I enter / and there is no command that I added, I tried to create a new bot on the portal, I changed the client id, token in the new bot, no commands are registered at all
17 replies
DIAdiscord.js - Imagine an app
Created by Martoz on 1/27/2024 in #djs-voice
help fix error
my bot was working a couple of days ago, now I decided to try to run it to write code, but when I wrote the command / mute in the discord, it started to give this error, although nothing happened to the bot for a couple of days
3 replies
DIAdiscord.js - Imagine an app
Created by Martoz on 1/19/2024 in #djs-questions
how to create a system of roles that such and commands can useis it possible to write this in json
?
5 replies