add /bridge status on rolt

This commit is contained in:
JandereDev 2022-05-27 18:40:04 +02:00
parent 04349493e8
commit 15de79fce7
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A

View file

@ -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](<https://github.com/janderedev/automod/wiki/Privacy-Policy>) for more info.',
'Bridge Status',
EmbedColor.Success,
)
]
});
}
case 'help': {
await message.reply({
content: '#',