3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-11 13:07:20 +00:00

Type fixes + circular dependency fix

This commit is contained in:
Dragory 2021-08-18 20:01:06 +03:00
parent 44fbd020db
commit c7f739fd8f
20 changed files with 70 additions and 83 deletions

View file

@ -49,24 +49,18 @@ export const ButtonInteractionEvt = reactionRolesEvt({
const group = cfg.button_groups[context.groupName];
if (!group) {
await sendEphemeralReply(int, `A configuration error was encountered, please contact the Administrators!`);
meta.pluginData
.getPlugin(LogsPlugin)
.log(
LogType.BOT_ALERT,
`**A configuration error occurred** on buttons for message ${int.message.id}, group **${context.groupName}** not found in config`,
);
meta.pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `**A configuration error occurred** on buttons for message ${int.message.id}, group **${context.groupName}** not found in config`,
});
return;
}
// Verify that detected action is known by us
if (!(<any>Object).values(ButtonMenuActions).includes(context.action)) {
await sendEphemeralReply(int, `A internal error was encountered, please contact the Administrators!`);
meta.pluginData
.getPlugin(LogsPlugin)
.log(
LogType.BOT_ALERT,
`**A internal error occurred** on buttons for message ${int.message.id}, action **${context.action}** is not known`,
);
meta.pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `**A internal error occurred** on buttons for message ${int.message.id}, action **${context.action}** is not known`,
});
return;
}