Unban

i got this unban code, it is part of a bigger mod commands group, its a subcommand. i am not catching anything on the console, i am just getting 'application didnt respond' on discord. all the listeners, interaction handlers are fine because rest of the subcommands in the same file work just fine.
11 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
HolyCow
HolyCowOP7mo ago
HolyCow
HolyCowOP7mo ago
please just ping me as soon as possible if anyone has a solution
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
HolyCow
HolyCowOP7mo ago
but the thing is it works for other commands literally in the same file i keep thinking its the logic but i dont see anything wrong in the code
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
HolyCow
HolyCowOP7mo ago
aight lemme boot up my pc Just a sec
else if (subcommand === "unmute") {
await interaction.deferReply({ ephemeral: true });
if (!timeouts.has(member.id)) {
return interaction.editReply({ content: 'This user is not currently timed out', ephemeral: true });
}

//remove timeout
await member.timeout(null, `[${reason} - by ${interaction.user.username}]`);

let dm = ":success:"; //if dm succesful
//dm user
const dmEmbedremove = new EmbedBuilder()
.setDescription(`:success: Your timeout in **MMI Headquarters** has been removed because \`${reason}\``)
.setColor("#2b2d31");
const component = {
type: 1, // ActionRow
components: [
{
type: 2, // Button
style: 5, // Link style
label: '💬 Server',
url: 'https://discord.com/channels/726914118736543836/1247511226427117618',
},
],
};
await member.send({ embeds: [dmEmbedremove], components: [component]}).catch(err => {
dm = ":deny:"; //if dm fails
});
else if (subcommand === "unmute") {
await interaction.deferReply({ ephemeral: true });
if (!timeouts.has(member.id)) {
return interaction.editReply({ content: 'This user is not currently timed out', ephemeral: true });
}

//remove timeout
await member.timeout(null, `[${reason} - by ${interaction.user.username}]`);

let dm = ":success:"; //if dm succesful
//dm user
const dmEmbedremove = new EmbedBuilder()
.setDescription(`:success: Your timeout in **MMI Headquarters** has been removed because \`${reason}\``)
.setColor("#2b2d31");
const component = {
type: 1, // ActionRow
components: [
{
type: 2, // Button
style: 5, // Link style
label: '💬 Server',
url: 'https://discord.com/channels/726914118736543836/1247511226427117618',
},
],
};
await member.send({ embeds: [dmEmbedremove], components: [component]}).catch(err => {
dm = ":deny:"; //if dm fails
});
here is the unmute command and defer works just fine
d.js docs
d.js docs7mo ago
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
HolyCow
HolyCowOP7mo ago
its pretty big You want pastebin or txt?
HolyCow
HolyCowOP7mo ago
ah well heres a txt
HolyCow
HolyCowOP7mo ago
cuz paste bin thinks its offensive https://pastebin.com/wrvgwmG9 here you go Sorry for that but you’ll have to login cuz like i said pastebin thinks its offensive so i had to make it private and ik you are just doing this out of courtesy but i kinda need a solution quick thanks for your help
Want results from more Discord servers?
Add your server