Migrate Slowmode to new Plugin structure
This commit is contained in:
parent
ebcb28261b
commit
b4b8680431
14 changed files with 538 additions and 0 deletions
20
backend/src/plugins/Slowmode/commands/SlowmodeDisableCmd.ts
Normal file
20
backend/src/plugins/Slowmode/commands/SlowmodeDisableCmd.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "src/pluginUtils";
|
||||
import { slowmodeCmd } from "../types";
|
||||
import { disableBotSlowmodeForChannel } from "../util/disableBotSlowmodeForChannel";
|
||||
import { noop } from "src/utils";
|
||||
import { actualDisableSlowmodeCmd } from "../util/actualDisableSlowmodeCmd";
|
||||
|
||||
export const SlowmodeDisableCmd = slowmodeCmd({
|
||||
trigger: ["slowmode disable", "slowmode d"],
|
||||
permission: "can_manage",
|
||||
|
||||
signature: {
|
||||
channel: ct.textChannel(),
|
||||
},
|
||||
|
||||
async run({ message: msg, args, pluginData }) {
|
||||
// Workaround until you can call this cmd from SlowmodeSetChannelCmd
|
||||
actualDisableSlowmodeCmd(msg, args, pluginData);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue