Fix interactionCreate listener
This commit is contained in:
parent
cdebcd92a0
commit
7e17f7564e
6 changed files with 12 additions and 6 deletions
|
@ -32,7 +32,8 @@ export default {
|
||||||
|
|
||||||
await interaction.reply({ content: 'Autoresponse is already enabled, do you wish to disable it?', components: [row], ephemeral: true });
|
await interaction.reply({ content: 'Autoresponse is already enabled, do you wish to disable it?', components: [row], ephemeral: true });
|
||||||
|
|
||||||
client.once('interactionCreate', async (interactionMenu) => {
|
client.on('interactionCreate', async (interactionMenu) => {
|
||||||
|
if (interaction.user !== interactionMenu.user) return;
|
||||||
if (!interactionMenu.isButton) return;
|
if (!interactionMenu.isButton) return;
|
||||||
interactionMenu.update({ components: [] });
|
interactionMenu.update({ components: [] });
|
||||||
if (interactionMenu.customId === 'yes') {
|
if (interactionMenu.customId === 'yes') {
|
||||||
|
|
|
@ -44,7 +44,8 @@ export default {
|
||||||
|
|
||||||
await interaction.reply({ content: 'The server already has a message set, do you want to edit it or remove it?', components: [row], ephemeral: true });
|
await interaction.reply({ content: 'The server already has a message set, do you want to edit it or remove it?', components: [row], ephemeral: true });
|
||||||
|
|
||||||
client.once('interactionCreate', async (interactionMenu) => {
|
client.on('interactionCreate', async (interactionMenu) => {
|
||||||
|
if (interaction.user !== interactionMenu.user) return;
|
||||||
if (!interactionMenu.isButton) return;
|
if (!interactionMenu.isButton) return;
|
||||||
interactionMenu.update({ components: [] });
|
interactionMenu.update({ components: [] });
|
||||||
if (interactionMenu.customId === 'edit') {
|
if (interactionMenu.customId === 'edit') {
|
||||||
|
|
|
@ -32,7 +32,8 @@ export default {
|
||||||
|
|
||||||
await interaction.reply({ content: 'Quotation is already enabled, do you wish to disable it?', components: [row], ephemeral: true });
|
await interaction.reply({ content: 'Quotation is already enabled, do you wish to disable it?', components: [row], ephemeral: true });
|
||||||
|
|
||||||
client.once('interactionCreate', async (interactionMenu) => {
|
client.on('interactionCreate', async (interactionMenu) => {
|
||||||
|
if (interaction.user !== interactionMenu.user) return;
|
||||||
if (!interactionMenu.isButton) return;
|
if (!interactionMenu.isButton) return;
|
||||||
interactionMenu.update({ components: [] });
|
interactionMenu.update({ components: [] });
|
||||||
if (interactionMenu.customId === 'yes') {
|
if (interactionMenu.customId === 'yes') {
|
||||||
|
|
|
@ -45,7 +45,8 @@ export default {
|
||||||
|
|
||||||
await interaction.reply({ content: 'The server already has a message set, do you want to edit it or remove it?', components: [row], ephemeral: true });
|
await interaction.reply({ content: 'The server already has a message set, do you want to edit it or remove it?', components: [row], ephemeral: true });
|
||||||
|
|
||||||
client.once('interactionCreate', async (interactionMenu) => {
|
client.on('interactionCreate', async (interactionMenu) => {
|
||||||
|
if (interaction.user !== interactionMenu.user) return;
|
||||||
if (!interactionMenu.isButton) return;
|
if (!interactionMenu.isButton) return;
|
||||||
interactionMenu.update({ components: [] });
|
interactionMenu.update({ components: [] });
|
||||||
if (interactionMenu.customId === 'edit') {
|
if (interactionMenu.customId === 'edit') {
|
||||||
|
|
|
@ -54,7 +54,8 @@ export default {
|
||||||
|
|
||||||
await interaction.editReply({ content: 'This user is already blacklisted, do you want to unblacklist him?', ephemeral: true, components: [row] });
|
await interaction.editReply({ content: 'This user is already blacklisted, do you want to unblacklist him?', ephemeral: true, components: [row] });
|
||||||
|
|
||||||
interaction.client.once('interactionCreate', async (interactionMenu) => {
|
interaction.client.on('interactionCreate', async (interactionMenu) => {
|
||||||
|
if (interaction.user !== interactionMenu.user) return;
|
||||||
if (!interactionMenu.isButton) return;
|
if (!interactionMenu.isButton) return;
|
||||||
interactionMenu.update({ components: [] });
|
interactionMenu.update({ components: [] });
|
||||||
if (interactionMenu.customId === 'yes') {
|
if (interactionMenu.customId === 'yes') {
|
||||||
|
|
|
@ -31,7 +31,8 @@ export default {
|
||||||
|
|
||||||
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] });
|
||||||
|
|
||||||
client.once('interactionCreate', async (interactionMenu) => {
|
client.on('interactionCreate', async (interactionMenu) => {
|
||||||
|
if (interaction.user !== interactionMenu.user) return;
|
||||||
if (!interactionMenu.isButton) return;
|
if (!interactionMenu.isButton) return;
|
||||||
interactionMenu.update({ components: [] });
|
interactionMenu.update({ components: [] });
|
||||||
if (interactionMenu.customId === 'yes') {
|
if (interactionMenu.customId === 'yes') {
|
||||||
|
|
Loading…
Reference in a new issue