Compare commits
No commits in common. "2f34b9fcc822c0a7f28c869dbc7d7e0fc46c133a" and "39ff404deb8761af6d593ad4a69de27eacdf2166" have entirely different histories.
2f34b9fcc8
...
39ff404deb
3 changed files with 23 additions and 35 deletions
|
@ -12,9 +12,9 @@ export default {
|
||||||
if (!isOptOut) {
|
if (!isOptOut) {
|
||||||
const body = { userID: interaction.user.id };
|
const body = { userID: interaction.user.id };
|
||||||
await db.optout.create(body);
|
await db.optout.create(body);
|
||||||
await interaction.reply({ content: 'You have successfully been opt out.', ephemeral: true });
|
return await interaction.reply({ content: 'You have successfully been opt out.' });
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
const row = new ActionRowBuilder()
|
const row = new ActionRowBuilder()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new ButtonBuilder()
|
new ButtonBuilder()
|
||||||
|
@ -29,21 +29,9 @@ export default {
|
||||||
.setStyle(ButtonStyle.Danger),
|
.setStyle(ButtonStyle.Danger),
|
||||||
);
|
);
|
||||||
|
|
||||||
await interaction.reply({ content: 'You are already opt out, do you wish to opt in?', components: [row], ephemeral: true });
|
await interaction.reply({ content: 'You are already opt out, do you wish to opt in?', components: [row] });
|
||||||
|
|
||||||
listenButton(client, interaction, interaction.user);
|
return listenButton(client, interaction, interaction.user);
|
||||||
}
|
|
||||||
|
|
||||||
return interaction.followUp({
|
|
||||||
content:
|
|
||||||
'As a reminder here what opting out does:\n'
|
|
||||||
+ '- Your user ID will no longer be used for debug logging.\n'
|
|
||||||
+ '- servers will no longer be shown in added/kicked stats.\n'
|
|
||||||
+ '- Your messages won\'t be quoted.\n'
|
|
||||||
+ '- Won\'t show the arguments from commands.',
|
|
||||||
ephemeral: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,10 +45,10 @@ async function listenButton(client, interaction, user = interaction.user, origin
|
||||||
|
|
||||||
if (interactionMenu.customId === `yes${interaction.user.id}${originalId}`) {
|
if (interactionMenu.customId === `yes${interaction.user.id}${originalId}`) {
|
||||||
db.optout.destroy({ where: { userID: interaction.user.id } });
|
db.optout.destroy({ where: { userID: interaction.user.id } });
|
||||||
return interaction.editReply({ content: 'You have successfully been opt in', ephemeral: true });
|
return interaction.editReply('You have successfully been opt in');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return interaction.editReply({ content: 'Nothing has been changed.', ephemeral: true });
|
return interaction.editReply('Nothing has been changed.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -83,7 +83,7 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isOptOut) {
|
if (!isOptOut) {
|
||||||
console.log(`\x1b[33m⤷\x1b[0m with args ${JSON.stringify(args)}`);
|
console.log(`\x1b[33m${commandName}\x1b[0m with args ${JSON.stringify(args)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await command.execute(interaction, args, client);
|
await command.execute(interaction, args, client);
|
||||||
|
|
|
@ -405,8 +405,8 @@ export default {
|
||||||
args[payloadName] = payload;
|
args[payloadName] = payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isOptOut && argsLength > 0) {
|
if (!isOptOut) {
|
||||||
console.log(`\x1b[33m⤷\x1b[0m with args ${JSON.stringify(args)}`);
|
console.log(`\x1b[33m${commandName}\x1b[0m with args ${JSON.stringify(args)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await command.execute(message, args, client);
|
await command.execute(message, args, client);
|
||||||
|
|
Loading…
Reference in a new issue