From 15de79fce7ba2e1511a0ac21c9fa683ade8bd654 Mon Sep 17 00:00:00 2001 From: JandereDev Date: Fri, 27 May 2022 18:40:04 +0200 Subject: [PATCH] add /bridge status on rolt --- bot/src/bot/commands/configuration/bridge.ts | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/bot/src/bot/commands/configuration/bridge.ts b/bot/src/bot/commands/configuration/bridge.ts index 81af2b2..e6b51f3 100644 --- a/bot/src/bot/commands/configuration/bridge.ts +++ b/bot/src/bot/commands/configuration/bridge.ts @@ -6,7 +6,7 @@ import CommandCategory from "../../../struct/commands/CommandCategory"; import SimpleCommand from "../../../struct/commands/SimpleCommand"; import MessageCommandContext from "../../../struct/MessageCommandContext"; import { DEFAULT_PREFIX } from "../../modules/command_handler"; -import { isBotManager, isModerator, NO_MANAGER_MSG } from "../../util"; +import { embed, EmbedColor, isBotManager, isModerator, NO_MANAGER_MSG } from "../../util"; const DISCORD_INVITE_URL = 'https://discord.com/api/oauth2/authorize?client_id=965692929643524136&permissions=536996864&scope=bot%20applications.commands'; // todo: read this from env or smth @@ -158,6 +158,28 @@ export default { } break; } + case 'status': { + const link = await dbs.BRIDGE_CONFIG.findOne({ revolt: message.channel_id }); + + if (!link) return await message.reply({ + embeds: [ + embed( + 'This channel is **not** bridged, and no message data is being sent to Discord.', + 'Bridge status', + EmbedColor.Success + ) + ] + }); + else return await message.reply({ + embeds: [ + embed( + 'This channel is bridged to Discord. Please refer to the [Privacy Policy]() for more info.', + 'Bridge Status', + EmbedColor.Success, + ) + ] + }); + } case 'help': { await message.reply({ content: '#',