Skip to content

Commit

Permalink
feat(ic): Redirect interactiveConfig to webpanel
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Mar 30, 2020
1 parent d82048a commit 7576830
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/framework/commands/config/interactiveConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Emoji, GuildChannel, Message, TextChannel } from 'eris';

import { IMClient } from '../../../client';
import { beautify, guildSettingsInfo, SettingsGroup, SettingsInfo, toDbValue } from '../../../settings';
import { BotCommand, CommandGroup, GuildPermission } from '../../../types';
import { BotCommand, BotType, CommandGroup, GuildPermission } from '../../../types';
import { GuildSettingsKey } from '../../models/GuildSetting';
import { SettingsValueResolver } from '../../resolvers';
import { Command, Context } from '../Command';
Expand Down Expand Up @@ -41,6 +41,15 @@ export default class extends Command {
description: 'Loading...'
});

// Ask users to use the webpanel on the regular bot
if (this.client.type === BotType.regular) {
embed.description = context.t('cmd.interactiveConfig.useWeb', {
configCmd: `\`${context.settings.prefix}config\``,
link: `https://app.invitemanager.gg/guild/${context.guild.id}/settings`
});
return this.sendReply(message, embed);
}

if (
message.channel instanceof GuildChannel &&
message.channel.permissionsOf(this.client.user.id).has(GuildPermission.MANAGE_MESSAGES)
Expand Down

0 comments on commit 7576830

Please sign in to comment.