mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 20:55:01 +00:00
Add antiraid commands
This commit is contained in:
parent
ed757dcbe2
commit
6324b9654b
4 changed files with 62 additions and 0 deletions
18
backend/src/plugins/Automod/commands/ViewAntiraidCmd.ts
Normal file
18
backend/src/plugins/Automod/commands/ViewAntiraidCmd.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { command } from "knub";
|
||||
import { AutomodPluginType } from "../types";
|
||||
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
|
||||
export const ViewAntiraidCmd = command<AutomodPluginType>()({
|
||||
trigger: "antiraid",
|
||||
permission: "can_view_antiraid",
|
||||
|
||||
async run({ pluginData, message, args }) {
|
||||
if (pluginData.state.cachedAntiraidLevel) {
|
||||
message.channel.createMessage(`Anti-raid is set to **${pluginData.state.cachedAntiraidLevel}**`);
|
||||
} else {
|
||||
message.channel.createMessage(`Anti-raid is **off**`);
|
||||
}
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue