diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-07-15 11:38:02 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-07-15 11:38:02 +0100 |
| commit | 23a00e62ce128ffab5b35f389a8f8598e619b862 (patch) | |
| tree | bb3958f346198633cf1214a819299eef14d23909 /174bg/discord-bot/main.js | |
| parent | a36bee323d7de1d55b92e9c6bf6e4fb3badd4381 (diff) | |
| download | unnamed-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/discord-bot/main.js')
| -rw-r--r-- | 174bg/discord-bot/main.js | 19 |
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 |
