|
1 | 1 | import { ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js'; |
2 | | -import mongoUtil from '../../Utils/functions/utils'; |
3 | 2 |
|
4 | 3 | export default { |
5 | 4 | data: new SlashCommandBuilder() |
6 | 5 | .setName('network') |
7 | | - .setDescription('Manage the chat network for this server.') |
| 6 | + .setDescription('Manage the chat network for this server. (deprecated)') |
8 | 7 | .setDMPermission(false) |
9 | 8 | .addSubcommand((subcommand) => |
10 | 9 | subcommand |
11 | 10 | .setName('connect') |
12 | | - .setDescription('Connect to the chat network.'), |
| 11 | + .setDescription('Connect to the chat network. (deprecated)'), |
13 | 12 | ) |
14 | 13 | .addSubcommand((subcommand) => |
15 | 14 | subcommand |
16 | 15 | .setName('disconnect') |
17 | | - .setDescription('Disconnect from the chat network.'), |
| 16 | + .setDescription('Disconnect from the chat network. (deprecated)'), |
18 | 17 | ), |
19 | | - /** @deprecated Use setup command instead.*/ |
20 | 18 | async execute(interaction: ChatInputCommandInteraction) { |
21 | | - const subcommand = interaction.options.getSubcommand(); |
22 | | - const database = mongoUtil.getDb(); |
23 | | - const connectedList = database?.collection('connectedList'); |
24 | | - const serverInBlacklist = await database?.collection('blacklistedServers').findOne({ serverId: interaction.guild?.id }); |
25 | | - |
26 | | - if (serverInBlacklist) { |
27 | | - return await interaction.reply(`This server is blacklisted from using the ChatBot Chat Network for reason \`${serverInBlacklist.reason}\`! Please join the support server and contact the staff to try and get whitelisted and/or if you think the reason is not valid.`); |
28 | | - } |
29 | | - |
30 | | - const subcommandFile = require(`../../Scripts/network/${subcommand}`); |
31 | | - subcommandFile.execute(interaction, connectedList); |
| 19 | + interaction.reply('This command has been deprecated. Use `/setup channel` instead.'); |
32 | 20 | }, |
33 | 21 | }; |
0 commit comments