Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit a8927b2

Browse files
committed
fix(network): Deprecated network command
1 parent 37d90a6 commit a8927b2

File tree

4 files changed

+5
-100
lines changed

4 files changed

+5
-100
lines changed

src/Commands/Main/network.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
11
import { ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
2-
import mongoUtil from '../../Utils/functions/utils';
32

43
export default {
54
data: new SlashCommandBuilder()
65
.setName('network')
7-
.setDescription('Manage the chat network for this server.')
6+
.setDescription('Manage the chat network for this server. (deprecated)')
87
.setDMPermission(false)
98
.addSubcommand((subcommand) =>
109
subcommand
1110
.setName('connect')
12-
.setDescription('Connect to the chat network.'),
11+
.setDescription('Connect to the chat network. (deprecated)'),
1312
)
1413
.addSubcommand((subcommand) =>
1514
subcommand
1615
.setName('disconnect')
17-
.setDescription('Disconnect from the chat network.'),
16+
.setDescription('Disconnect from the chat network. (deprecated)'),
1817
),
19-
/** @deprecated Use setup command instead.*/
2018
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.');
3220
},
3321
};

src/Commands/Main/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import logger from '../../Utils/logger';
66
export default {
77
data: new SlashCommandBuilder()
88
.setName('setup')
9-
.setDescription('Set me up to receive messages from a channel.')
9+
.setDescription('Manage the chat network for this server.')
1010
.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels)
1111
.setDMPermission(false)
1212
.addSubcommand((subcommand) =>

src/Scripts/network/connect.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/Scripts/network/disconnect.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)