This commit is contained in:
Ean Milligan (Bastion) 2023-04-26 07:48:14 -04:00
parent ed827a42fd
commit f0e2097b1d
2 changed files with 27 additions and 23 deletions

View File

@ -1,6 +1,6 @@
import { ApplicationCommandFlags, Bot, Interaction, InteractionResponseTypes } from '../../../deps.ts'; import { ApplicationCommandFlags, Bot, Interaction, InteractionResponseTypes } from '../../../deps.ts';
import { dbClient, generateGuildSettingKey, lfgChannelSettings, queries } from '../../db.ts'; import { dbClient, generateGuildSettingKey, lfgChannelSettings, queries } from '../../db.ts';
import { failColor, infoColor1, infoColor2, safelyDismissMsg, somethingWentWrong, successColor, sendDirectMessage } from '../../commandUtils.ts'; import { failColor, infoColor1, infoColor2, safelyDismissMsg, sendDirectMessage, somethingWentWrong, successColor } from '../../commandUtils.ts';
import { generateMemberList, idSeparator, pathIdxEnder, pathIdxSeparator } from '../eventUtils.ts'; import { generateMemberList, idSeparator, pathIdxEnder, pathIdxSeparator } from '../eventUtils.ts';
import utils from '../../utils.ts'; import utils from '../../utils.ts';
import config from '../../../config.ts'; import config from '../../../config.ts';
@ -78,7 +78,8 @@ const execute = async (bot: Bot, interaction: Interaction) => {
name: userName, name: userName,
}]), }]),
inline: true, inline: true,
}, { },
{
name: 'Are you unhappy with this action?', name: 'Are you unhappy with this action?',
value: `Please reach out to the ${config.name} Manager that performed this action, or the moderators/administrators of ${guildName}.`, value: `Please reach out to the ${config.name} Manager that performed this action, or the moderators/administrators of ${guildName}.`,
}, },

View File

@ -1,5 +1,5 @@
import { ApplicationCommandFlags, Bot, Interaction, InteractionResponseTypes } from '../../../deps.ts'; import { ApplicationCommandFlags, Bot, Interaction, InteractionResponseTypes } from '../../../deps.ts';
import { failColor, infoColor1, infoColor2, safelyDismissMsg, somethingWentWrong, successColor, sendDirectMessage } from '../../commandUtils.ts'; import { failColor, infoColor1, infoColor2, safelyDismissMsg, sendDirectMessage, somethingWentWrong, successColor } from '../../commandUtils.ts';
import { generateMemberList, idSeparator, LfgEmbedIndexes, pathIdxEnder, pathIdxSeparator } from '../eventUtils.ts'; import { generateMemberList, idSeparator, LfgEmbedIndexes, pathIdxEnder, pathIdxSeparator } from '../eventUtils.ts';
import { deleteTokenEarly } from '../tokenCleanup.ts'; import { deleteTokenEarly } from '../tokenCleanup.ts';
import utils from '../../utils.ts'; import utils from '../../utils.ts';
@ -62,7 +62,8 @@ const execute = async (bot: Bot, interaction: Interaction) => {
}).catch((e: Error) => utils.commonLoggers.messageSendError('updateEvent.ts', 'send log message', e)); }).catch((e: Error) => utils.commonLoggers.messageSendError('updateEvent.ts', 'send log message', e));
sendDirectMessage(bot, ownerId, { sendDirectMessage(bot, ownerId, {
embeds: [{ embeds: [
{
color: infoColor2, color: infoColor2,
title: `Notice: A ${config.name} Manager has edited one of your events in ${guildName}`, title: `Notice: A ${config.name} Manager has edited one of your events in ${guildName}`,
description: 'The edited event is listed below. The old event is listed first and marked with a blue bar.', description: 'The edited event is listed below. The old event is listed first and marked with a blue bar.',
@ -74,14 +75,16 @@ const execute = async (bot: Bot, interaction: Interaction) => {
name: userName, name: userName,
}]), }]),
inline: true, inline: true,
}, { },
{
name: 'Are you unhappy with this action?', name: 'Are you unhappy with this action?',
value: `Please reach out to the ${config.name} Manager that performed this action, or the moderators/administrators of ${guildName}.`, value: `Please reach out to the ${config.name} Manager that performed this action, or the moderators/administrators of ${guildName}.`,
}, },
], ],
}, },
oldEventEmbed || missingOldEmbed, oldEventEmbed || missingOldEmbed,
newEventEmbed,], newEventEmbed,
],
}).catch((e: Error) => utils.commonLoggers.messageSendError('managerJLA.ts', 'send DM fail', e)); }).catch((e: Error) => utils.commonLoggers.messageSendError('managerJLA.ts', 'send DM fail', e));
} }
}).catch((e) => { }).catch((e) => {