mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +00:00
Fixes, refactoring and PR feedback
This commit is contained in:
parent
0be54912c4
commit
893a77d562
202 changed files with 1037 additions and 1069 deletions
|
@ -21,17 +21,17 @@ export const AllowServerCmd = botControlCmd({
|
|||
async run({ pluginData, message: msg, args }) {
|
||||
const existing = await pluginData.state.allowedGuilds.find(args.guildId);
|
||||
if (existing) {
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Server is already allowed!");
|
||||
void msg.channel.send("Server is already allowed!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isSnowflake(args.guildId)) {
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Invalid server ID!");
|
||||
void msg.channel.send("Invalid server ID!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.userId && !isSnowflake(args.userId)) {
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Invalid user ID!");
|
||||
void msg.channel.send("Invalid user ID!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,6 @@ export const AllowServerCmd = botControlCmd({
|
|||
);
|
||||
}
|
||||
|
||||
pluginData.getPlugin(CommonPlugin).sendSuccessMessage(msg, "Server is now allowed to use Zeppelin!");
|
||||
void msg.channel.send("Server is now allowed to use Zeppelin!");
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue