aboutsummaryrefslogtreecommitdiff
path: root/174bg
diff options
context:
space:
mode:
authorAlex Pooley (@zuedev) <zuedev@gmail.com>2026-07-15 11:38:02 +0100
committerAlex Pooley (@zuedev) <zuedev@gmail.com>2026-07-15 11:38:02 +0100
commit23a00e62ce128ffab5b35f389a8f8598e619b862 (patch)
treebb3958f346198633cf1214a819299eef14d23909 /174bg
parenta36bee323d7de1d55b92e9c6bf6e4fb3badd4381 (diff)
downloadunnamed-group-23a00e62ce128ffab5b35f389a8f8598e619b862.tar
unnamed-group-23a00e62ce128ffab5b35f389a8f8598e619b862.tar.gz
unnamed-group-23a00e62ce128ffab5b35f389a8f8598e619b862.tar.bz2
unnamed-group-23a00e62ce128ffab5b35f389a8f8598e619b862.tar.xz
unnamed-group-23a00e62ce128ffab5b35f389a8f8598e619b862.zip
add scope command
Diffstat (limited to '174bg')
-rw-r--r--174bg/discord-bot/main.js19
1 files changed, 19 insertions, 0 deletions
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
@@ -15,6 +15,21 @@ import {
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")
.setDescription(
"Creates a requisition ticket for the quartermaster to review.",
@@ -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