From 5f92cff088dca20fddbac687ded33e0d6b0f98e3 Mon Sep 17 00:00:00 2001 From: Sean Boult <996134+Hacksore@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:48:31 -0500 Subject: [PATCH] Add invite command --- apps/bot/src/commands.ts | 7 +++++++ apps/bot/src/index.ts | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/apps/bot/src/commands.ts b/apps/bot/src/commands.ts index c211cc49..e65f0743 100644 --- a/apps/bot/src/commands.ts +++ b/apps/bot/src/commands.ts @@ -51,3 +51,10 @@ export const HELP = defineCommand({ integration_types: [USER_INSTALL, GUILD_INSTALL], contexts: [0, 1, 2], }); + +export const INVITE = defineCommand({ + name: "invite", + description: "Join the Overlayed discord", + integration_types: [USER_INSTALL, GUILD_INSTALL], + contexts: [0, 1, 2], +}); diff --git a/apps/bot/src/index.ts b/apps/bot/src/index.ts index 61ae2c84..bf81a740 100644 --- a/apps/bot/src/index.ts +++ b/apps/bot/src/index.ts @@ -9,6 +9,7 @@ import { CANARY, HELP, INFO, + INVITE, } from "./commands.js"; import { Bindings } from "./types.js"; import { verifyDiscordRequest } from "./utils.js"; @@ -92,6 +93,16 @@ app.post("/", async (c) => { }); } + if (command === INVITE.name.toLowerCase()) { + return c.json({ + type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE, + data: { + content: `${LOGO_MOJI} Join the Overlayed Discord +discord.gg/eXmeNkVjye`, + }, + }); + } + if (command === HELP.name.toLowerCase()) { return c.json({ type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,