mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
chat bridge command fix lol AND chat box resizing!!!
This commit is contained in:
@@ -42,9 +42,15 @@ function createBridgeCommand({ getGuildConfig, setGuildConfig, removeGuildConfig
|
||||
if (mode && !VALID_MODES.has(mode)) return message.reply({ content: 'Invalid mode. Use `global` or `private`.', allowedMentions: { parse: [], repliedUser: false } });
|
||||
|
||||
if (action === 'status') return message.reply({ content: status(getGuildConfig(guildId)), allowedMentions: { parse: [], repliedUser: false } });
|
||||
if (action === 'off') { removeGuildConfig(guildId); return message.reply({ content: 'Chat bridge disabled for this server.', allowedMentions: { parse: [], repliedUser: false } }); }
|
||||
|
||||
// Every command below this point mutates the guild bridge configuration.
|
||||
// Keeping the authorization check in one shared gate prevents destructive
|
||||
// actions, especially `rs bridge off`, from accidentally bypassing the same
|
||||
// Manage Server/admin requirement used by `here` and `mode`.
|
||||
if (!canManageBridge(message)) return message.reply({ content: 'You need Manage Server permissions to change the chat bridge.', allowedMentions: { parse: [], repliedUser: false } });
|
||||
|
||||
if (action === 'off') { removeGuildConfig(guildId); return message.reply({ content: 'Chat bridge disabled for this server.', allowedMentions: { parse: [], repliedUser: false } }); }
|
||||
|
||||
if (action === 'here') {
|
||||
try {
|
||||
const entry = await ensureBridgeWebhook(message.channel, guildId);
|
||||
|
||||
Reference in New Issue
Block a user