added role reaction dynamic embed changes
This commit is contained in:
@@ -221,13 +221,17 @@ async function selectMenuHandler(interaction) {
|
||||
|
||||
|
||||
async function modalHandler(interaction) {
|
||||
const baseCustomId =
|
||||
interaction.customId.split(":")[0];
|
||||
const customId =
|
||||
interaction.customId
|
||||
.split(":")[0];
|
||||
|
||||
|
||||
const modal =
|
||||
interaction.client.modals.get(
|
||||
baseCustomId
|
||||
);
|
||||
interaction.client
|
||||
.modals
|
||||
.get(
|
||||
customId
|
||||
);
|
||||
|
||||
|
||||
if (!modal) {
|
||||
@@ -245,6 +249,7 @@ async function modalHandler(interaction) {
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
|
||||
if (
|
||||
interaction.replied ||
|
||||
interaction.deferred
|
||||
@@ -252,6 +257,7 @@ async function modalHandler(interaction) {
|
||||
await interaction.followUp({
|
||||
content:
|
||||
"There was an error while executing this modal!",
|
||||
|
||||
flags:
|
||||
MessageFlags.Ephemeral
|
||||
});
|
||||
@@ -260,6 +266,7 @@ async function modalHandler(interaction) {
|
||||
await interaction.reply({
|
||||
content:
|
||||
"There was an error while executing this modal!",
|
||||
|
||||
flags:
|
||||
MessageFlags.Ephemeral
|
||||
});
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
const {
|
||||
Events
|
||||
} = require("discord.js");
|
||||
|
||||
const {
|
||||
handleRaidReaction
|
||||
} = require(
|
||||
"../utils/raidPlanner"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
Events.MessageReactionAdd,
|
||||
|
||||
once:
|
||||
false,
|
||||
|
||||
|
||||
async execute(
|
||||
reaction,
|
||||
user
|
||||
) {
|
||||
try {
|
||||
await handleRaidReaction(
|
||||
reaction,
|
||||
user,
|
||||
true
|
||||
);
|
||||
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"Raid planner reaction add error:",
|
||||
error
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
const {
|
||||
Events
|
||||
} = require("discord.js");
|
||||
|
||||
const {
|
||||
handleRaidReaction
|
||||
} = require(
|
||||
"../utils/raidPlanner"
|
||||
);
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
Events.MessageReactionRemove,
|
||||
|
||||
once:
|
||||
false,
|
||||
|
||||
|
||||
async execute(
|
||||
reaction,
|
||||
user
|
||||
) {
|
||||
try {
|
||||
await handleRaidReaction(
|
||||
reaction,
|
||||
user,
|
||||
false
|
||||
);
|
||||
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"Raid planner reaction remove error:",
|
||||
error
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user