mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
feat: add member cache; handle all role changes with RoleManagerPlugin; exit gracefully
This commit is contained in:
parent
fd60a09947
commit
fa50110766
48 changed files with 755 additions and 264 deletions
|
@ -1,9 +1,9 @@
|
|||
import { GuildChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
|
||||
export const RemoveRoleCmd = rolesCmd({
|
||||
|
@ -49,10 +49,7 @@ export const RemoveRoleCmd = rolesCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
pluginData.state.logs.ignoreLog(LogType.MEMBER_ROLE_REMOVE, args.member.id);
|
||||
|
||||
await args.member.roles.remove(roleId);
|
||||
|
||||
pluginData.getPlugin(RoleManagerPlugin).removeRole(args.member.id, roleId);
|
||||
pluginData.getPlugin(LogsPlugin).logMemberRoleRemove({
|
||||
mod: msg.author,
|
||||
member: args.member,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue