forked from Supositware/Haha-Yes
Tell what opting out does
This commit is contained in:
parent
dceb4fbbb8
commit
2f34b9fcc8
1 changed files with 32 additions and 20 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);
|
||||||
return await interaction.reply({ content: 'You have successfully been opt out.' });
|
await interaction.reply({ content: 'You have successfully been opt out.', ephemeral: true });
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
const row = new ActionRowBuilder()
|
const row = new ActionRowBuilder()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new ButtonBuilder()
|
new ButtonBuilder()
|
||||||
|
@ -29,9 +29,21 @@ 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] });
|
await interaction.reply({ content: 'You are already opt out, do you wish to opt in?', components: [row], ephemeral: true });
|
||||||
|
|
||||||
return listenButton(client, interaction, interaction.user);
|
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,
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -45,10 +57,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('You have successfully been opt in');
|
return interaction.editReply({ content: 'You have successfully been opt in', ephemeral: true });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return interaction.editReply('Nothing has been changed.');
|
return interaction.editReply({ content: 'Nothing has been changed.', ephemeral: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in a new issue