aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacob janzen <53062115+JacobJanzen@users.noreply.github.com>2024-12-11 20:28:09 -0600
committerGitHub <noreply@github.com>2024-12-11 20:28:09 -0600
commit36066ad3d8d92855bbfdf4273a53066c6092fa45 (patch)
tree7f432cebbfc4c186a2cbc6d5f841efc4ed8f4c9e
parent78541dcecfc154493a6f1cedf33c0c8178331d96 (diff)
add blep command (#4)
-rw-r--r--app.js4
-rw-r--r--command_impls.js8
-rw-r--r--commands.js7
3 files changed, 18 insertions, 1 deletions
diff --git a/app.js b/app.js
index aee587c..f445a8f 100644
--- a/app.js
+++ b/app.js
@@ -7,6 +7,7 @@ import {
} from "discord-interactions";
import { Client, GatewayIntentBits, ActivityType } from "discord.js";
import {
+ blep,
help,
pet,
schedule_message,
@@ -42,6 +43,9 @@ function handle_application_command(state, data, channel_id) {
case "help":
return help(state);
+ case "blep":
+ return blep(state);
+
default:
console.error(`unknown command: ${name}`);
return res.status(400).json({ error: "unknown command" });
diff --git a/command_impls.js b/command_impls.js
index 3079e83..d10b293 100644
--- a/command_impls.js
+++ b/command_impls.js
@@ -41,8 +41,14 @@ export function help(state) {
state,
`Hi, I'm sily-bot!
Here are the available commands and their descriptions:
+- \`/blep\` blep.
+- \`/help\` Show this message.
- \`/pet\` You can pet sily-bot.
-- \`/schedule-message <message> <cron>\` Schedule a message to be send later. Works like Linux cron jobs in the format second minute hour day month weekday. Put the number (or name of month or weekday) in each spot. If you want it to run every second, minute, etc. instead of once when it reaches the provided number, use a * instead of a number. For instance, to run a job every minute on January 4th, you might use 0 * * 4 January *. The bot replies with a UUID that can be used to cancel the cron job later.
+- \`/schedule-message <message> <cron>\` Schedule a message to be send later. Works like Linux cron jobs in the format second minute hour day month weekday. Put the number (or name of month or weekday) in each spot. If you want it to run every second, minute, etc. instead of once when it reaches the provided number, use a \`*\` instead of a number. For instance, to run a job every minute on January 4th, you might use \`0 * * 4 January *\`. The bot replies with a UUID that can be used to cancel the cron job later.
- \`/unschedule-message <id>\` Stop sending a message with the given id.`,
);
}
+
+export function blep(state) {
+ return send(state, `≽^•𐃷•^≼`);
+}
diff --git a/commands.js b/commands.js
index e7fb92a..2c35d5e 100644
--- a/commands.js
+++ b/commands.js
@@ -4,6 +4,13 @@ import { REST, Routes } from "discord.js";
const commands = [
{
+ name: "blep",
+ description: "blep",
+ type: 1,
+ integration_types: [0],
+ contexts: [0],
+ },
+ {
name: "help",
description: "get help",
type: 1,