From 0fbf84b271709582fb328941382f563d15e129eb Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Sun, 8 Dec 2024 01:56:35 +0000 Subject: initial commit --- commands.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 commands.js (limited to 'commands.js') diff --git a/commands.js b/commands.js new file mode 100644 index 0000000..7df2f8c --- /dev/null +++ b/commands.js @@ -0,0 +1,35 @@ +import 'dotenv/config'; +import {InstallGlobalCommands} from './utils.js'; + +const SCHEDULE_MESSAGE = { + name: 'schedule_message', + description: 'Register a message to be sent at a specific time', + type: 1, + options: [ + { + type: 3, + name: 'message', + description: 'the message to send', + required: true, + }, + { + type: 3, + name: 'crontab_string', + description: 'the time the message should be sent at in crontab format', + required: true, + }, + { + type: 4, + name: 'repeat', + description: 'how many times should the message be repeated? (0 is infinite and the default)', + required: false, + min_value: 0, + }, + ], + integration_types: [0, 1], + contexts: [0, 1, 2], +}; + +const ALL_COMMANDS = [SCHEDULE_MESSAGE]; + +InstallGlobalCommands(process.env.APP_ID, ALL_COMMANDS); -- cgit v1.2.3