Migrate Post to new Plugin structure

This commit is contained in:
Dark 2020-07-23 21:26:22 +02:00
parent ebcb28261b
commit 5c070643a3
15 changed files with 752 additions and 0 deletions

View 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);
},
});