aboutsummaryrefslogtreecommitdiff
path: root/174bg/discord-bot
diff options
context:
space:
mode:
Diffstat (limited to '174bg/discord-bot')
-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