aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config/autoPublishChannel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/config/autoPublishChannel.ts')
-rw-r--r--src/commands/config/autoPublishChannel.ts48
1 files changed, 6 insertions, 42 deletions
diff --git a/src/commands/config/autoPublishChannel.ts b/src/commands/config/autoPublishChannel.ts
index a58f32f..d691a7f 100644
--- a/src/commands/config/autoPublishChannel.ts
+++ b/src/commands/config/autoPublishChannel.ts
@@ -1,59 +1,23 @@
-import { AllowedMentions, BushCommand, BushMessage } from '@lib';
-import { Channel } from 'discord.js';
+import { BushCommand, BushMessage } from '@lib';
export default class AutoPublishChannelCommand extends BushCommand {
public constructor() {
- super('autopublishchannel', {
+ super('autoPublishChannel', {
aliases: ['autopublishchannel', 'apc', 'publishchannel', 'autopublishchannels', 'publishchannels', 'autopublish'],
category: 'config',
description: {
- content: 'A command to add/remove channels from being automatically published.',
+ content: 'This command has been deprecated, please use the config command instead',
usage: 'autopublishchannel <channel>',
examples: ['autopublishchannel #github']
},
- args: [
- {
- id: 'channel',
- type: 'channel',
- match: 'content',
- prompt: {
- start: 'What channel would you like to toggle auto publishing in?',
- retry: '{error} Choose a valid channel.',
- optional: false
- }
- }
- ],
- slash: true,
- slashOptions: [
- {
- name: 'channel',
- description: 'What channel would you like me to send welcome messages in?',
- type: 'CHANNEL',
- required: true
- }
- ],
channel: 'guild',
+ hidden: true,
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['MANAGE_GUILD', 'SEND_MESSAGES']
});
}
- public override async exec(message: BushMessage, { channel }: { channel: Channel }): Promise<unknown> {
- const autoPublishChannels = await message.guild!.getSetting('autoPublishChannels');
- const newValue = util.addOrRemoveFromArray(
- autoPublishChannels.includes(channel.id) ? 'remove' : 'add',
- autoPublishChannels,
- channel.id
- );
- await message.guild!.setSetting('autoPublishChannels', newValue);
- client.logger.debugRaw(autoPublishChannels);
- client.logger.debugRaw(channel.id);
- client.logger.debugRaw(autoPublishChannels.includes(channel.id));
- return await message.util.reply({
- content: `${util.emojis.success} Successfully ${
- autoPublishChannels.includes(channel.id) ? 'enabled' : 'disabled'
- } auto publishing in <#${channel.id}>.`,
- allowedMentions: AllowedMentions.none()
- });
+ public override async exec(message: BushMessage): Promise<unknown> {
+ return message.util.reply(`${util.emojis.error} 'This command has been deprecated, please use the config command instead'`);
}
}