Migrate ModActions to new Plugin structure !!mutes dont work!!

This commit is contained in:
Dark 2020-07-24 02:25:33 +02:00
parent ebcb28261b
commit fd56664984
29 changed files with 1213 additions and 16 deletions

View file

@ -0,0 +1,35 @@
import { modActionsCommand } from "../types";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
import { resolveUser, resolveMember } from "../../../utils";
import { MutesPlugin } from "src/plugins/Mutes/MutesPlugin";
import { actualUnmuteCmd } from "../functions/actualUnmuteUserCmd";
import { isBanned } from "../functions/isBanned";
import { plugin } from "knub";
import { actualKickMemberCmd } from "../functions/actualKickMemberCmd";
const opts = {
mod: ct.member({ option: true }),
notify: ct.string({ option: true }),
"notify-channel": ct.textChannel({ option: true }),
clean: ct.bool({ option: true, isSwitch: true }),
};
export const KickCmd = modActionsCommand({
trigger: "kick",
permission: "can_kick",
description: "Kick the specified member",
signature: [
{
user: ct.string(),
reason: ct.string({ required: false, catchAll: true }),
...opts,
},
],
async run({ pluginData, message: msg, args }) {
actualKickMemberCmd(pluginData, msg, args);
},
});