mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 19:17:19 +00:00
Ran prettier to fix style issues
This commit is contained in:
parent
893a77d562
commit
1f0c7a4349
170 changed files with 396 additions and 453 deletions
|
@ -1,5 +1,6 @@
|
|||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
|
||||
import { AddRoleCmd } from "./commands/AddRoleCmd";
|
||||
|
@ -7,7 +8,6 @@ import { MassAddRoleCmd } from "./commands/MassAddRoleCmd";
|
|||
import { MassRemoveRoleCmd } from "./commands/MassRemoveRoleCmd";
|
||||
import { RemoveRoleCmd } from "./commands/RemoveRoleCmd";
|
||||
import { RolesPluginType, zRolesConfig } from "./types";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
|
||||
const defaultOptions: PluginOptions<RolesPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -2,7 +2,6 @@ import { GuildChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
|
@ -58,6 +57,9 @@ export const AddRoleCmd = rolesCmd({
|
|||
roles: [role],
|
||||
});
|
||||
|
||||
void pluginData.state.common.sendSuccessMessage(msg, `Added role **${role.name}** to ${verboseUserMention(args.member.user)}!`);
|
||||
void pluginData.state.common.sendSuccessMessage(
|
||||
msg,
|
||||
`Added role **${role.name}** to ${verboseUserMention(args.member.user)}!`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,7 +3,6 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
|
|||
import { logger } from "../../../logger";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { resolveMember, resolveRoleId, successMessage } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
|
@ -30,7 +29,10 @@ export const MassAddRoleCmd = rolesCmd({
|
|||
|
||||
for (const member of members) {
|
||||
if (!canActOn(pluginData, msg.member, member, true)) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, "Cannot add roles to 1 or more specified members: insufficient permissions");
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
"Cannot add roles to 1 or more specified members: insufficient permissions",
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import { GuildMember } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { resolveMember, resolveRoleId, successMessage } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
|
@ -29,7 +28,10 @@ export const MassRemoveRoleCmd = rolesCmd({
|
|||
|
||||
for (const member of members) {
|
||||
if (!canActOn(pluginData, msg.member, member, true)) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, "Cannot add roles to 1 or more specified members: insufficient permissions");
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
"Cannot add roles to 1 or more specified members: insufficient permissions",
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import { GuildChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
|
@ -19,7 +18,10 @@ export const RemoveRoleCmd = rolesCmd({
|
|||
|
||||
async run({ message: msg, args, pluginData }) {
|
||||
if (!canActOn(pluginData, msg.member, args.member, true)) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, "Cannot remove roles from this user: insufficient permissions");
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
"Cannot remove roles from this user: insufficient permissions",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -57,6 +59,9 @@ export const RemoveRoleCmd = rolesCmd({
|
|||
roles: [role],
|
||||
});
|
||||
|
||||
void pluginData.state.common.sendSuccessMessage(msg, `Removed role **${role.name}** from ${verboseUserMention(args.member.user)}!`);
|
||||
void pluginData.state.common.sendSuccessMessage(
|
||||
msg,
|
||||
`Removed role **${role.name}** from ${verboseUserMention(args.member.user)}!`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue