Migrate Post to new Plugin structure
This commit is contained in:
parent
ebcb28261b
commit
5c070643a3
15 changed files with 752 additions and 0 deletions
23
backend/src/plugins/Post/commands/PostCmd.ts
Normal file
23
backend/src/plugins/Post/commands/PostCmd.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { postCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { actualPostCmd } from "../util/actualPostCmd";
|
||||
|
||||
export const PostCmd = postCmd({
|
||||
trigger: "post",
|
||||
permission: "can_post",
|
||||
|
||||
signature: {
|
||||
channel: ct.textChannel(),
|
||||
content: ct.string({ catchAll: true }),
|
||||
|
||||
"enable-mentions": ct.bool({ option: true, isSwitch: true }),
|
||||
schedule: ct.string({ option: true }),
|
||||
repeat: ct.delay({ option: true }),
|
||||
"repeat-until": ct.string({ option: true }),
|
||||
"repeat-times": ct.number({ option: true }),
|
||||
},
|
||||
|
||||
async run({ message: msg, args, pluginData }) {
|
||||
actualPostCmd(pluginData, msg, args.channel, { content: args.content }, args);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue