mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Migrate ModActions to new Plugin structure !!mutes dont work!!
This commit is contained in:
parent
ebcb28261b
commit
fd56664984
29 changed files with 1213 additions and 16 deletions
35
backend/src/plugins/ModActions/commands/SoftbanCommand.ts
Normal file
35
backend/src/plugins/ModActions/commands/SoftbanCommand.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
import { modActionsCommand } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { trimPluginDescription } from "../../../utils";
|
||||
import { actualKickMemberCmd } from "../functions/actualKickMemberCmd";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
notify: ct.string({ option: true }),
|
||||
"notify-channel": ct.textChannel({ option: true }),
|
||||
};
|
||||
|
||||
export const SoftbanCmd = modActionsCommand({
|
||||
trigger: "softban",
|
||||
permission: "can_kick",
|
||||
description: trimPluginDescription(`
|
||||
"Softban" the specified user by banning and immediately unbanning them. Effectively a kick with message deletions.
|
||||
This command will be removed in the future, please use kick with the \`- clean\` argument instead
|
||||
`),
|
||||
|
||||
signature: [
|
||||
{
|
||||
user: ct.string(),
|
||||
reason: ct.string({ required: false, catchAll: true }),
|
||||
|
||||
...opts,
|
||||
},
|
||||
],
|
||||
|
||||
async run({ pluginData, message: msg, args }) {
|
||||
await actualKickMemberCmd(pluginData, msg, { clean: true, ...args });
|
||||
await msg.channel.createMessage(
|
||||
"Softban will be removed in the future - please use the kick command with the `-clean` argument instead!",
|
||||
);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue