From 23a00e62ce128ffab5b35f389a8f8598e619b862 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Wed, 15 Jul 2026 11:38:02 +0100 Subject: add scope command --- 174bg/discord-bot/main.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to '174bg/discord-bot') diff --git a/174bg/discord-bot/main.js b/174bg/discord-bot/main.js index bcf0cea..92b4645 100644 --- a/174bg/discord-bot/main.js +++ b/174bg/discord-bot/main.js @@ -13,6 +13,21 @@ import { } from "discord.js"; const commands = [ + { + data: new SlashCommandBuilder() + .setName("scope") + .setDescription("Returns the current scope of the bot."), + execute: async (interaction) => { + const scope = { + guildIdFromEnv: process.env.DISCORD_GUILD_ID, + guildIdFromInteraction: interaction.guild.id, + doGuildIdsMatch: + process.env.DISCORD_GUILD_ID === interaction.guild.id, + }; + + await interaction.reply(codewrap("json", JSON.stringify(scope, null, 2))); + } + }, { data: new SlashCommandBuilder() .setName("create-requisition-ticket") @@ -263,3 +278,7 @@ function sendMessageToLogsChannel(message) { logsChannel.send(message); } + +function codewrap(language, content) { + return "```" + language + "\n" + content + "\n```"; +} \ No newline at end of file -- cgit v1.2.3