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

Fixes, refactoring and PR feedback

This commit is contained in:
Lily Bergonzat 2024-04-15 15:51:45 +02:00
parent 0be54912c4
commit 893a77d562
202 changed files with 1037 additions and 1069 deletions

View file

@ -23,7 +23,7 @@ export const ContextCmd = utilityCmd({
async run({ message: msg, args, pluginData }) {
if (args.channel && !(args.channel instanceof TextChannel)) {
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Channel must be a text channel");
void pluginData.state.common.sendErrorMessage(msg, "Channel must be a text channel");
return;
}
@ -31,7 +31,7 @@ export const ContextCmd = utilityCmd({
const messageId = args.messageId ?? args.message.messageId;
if (!canReadChannel(channel, msg.member)) {
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Message context not found");
void pluginData.state.common.sendErrorMessage(msg, "Message context not found");
return;
}
@ -42,7 +42,7 @@ export const ContextCmd = utilityCmd({
})
)[0];
if (!previousMessage) {
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Message context not found");
void pluginData.state.common.sendErrorMessage(msg, "Message context not found");
return;
}