Skip to content

Commit de12a6b

Browse files
committed
Update starboard thx to bunny
1 parent 1b841fe commit de12a6b

File tree

4 files changed

+477
-301
lines changed

4 files changed

+477
-301
lines changed

commands/Starboard/starboard.js

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ class Starboard extends Command {
77
constructor(client) {
88
super(client, {
99
name: 'starboard',
10-
description: 'Configure starboard systems',
10+
description: 'Create/Delete starboard systems',
1111
category: 'Starboard',
12-
usage: 'starboard <create|delete|list> [name]',
12+
usage: 'starboard <create|delete> [name]',
1313
guildOnly: true,
1414
permLevel: 'Administrator',
1515
aliases: ['star', 'sb'],
16-
examples: ['starboard create highlights #starboard', 'starboard delete highlights', 'starboard list'],
16+
examples: ['starboard create highlights #starboard', 'starboard delete highlights'],
1717
});
1818
}
1919

@@ -30,26 +30,15 @@ class Starboard extends Command {
3030
return msg.channel.send('No starboards have been set up yet!');
3131
}
3232

33-
const embed = new EmbedBuilder()
34-
.setTitle('Server Starboards')
35-
.setColor(msg.settings.embedColor)
33+
const errorEmbed = new EmbedBuilder()
34+
.setTitle('Invalid Subcommand')
35+
.setColor(msg.settings.embedErrorColor)
3636
.setDescription(
37-
Object.entries(starboards)
38-
.map(([name, config]) => {
39-
return (
40-
`**${name}**\n` +
41-
`Channel: <#${config.channelId}>\n` +
42-
`Threshold: ${config.threshold}\n` +
43-
`Emoji: ${config.emoji}\n` +
44-
`Color: ${config.color || msg.settings.embedColor}\n` +
45-
`Status: ${config.enabled ? 'Enabled' : 'Disabled'}\n`
46-
);
47-
})
48-
.join('\n') + `\nTo edit a starboard please use </starboard edit:1344539277106741308>.`,
49-
// Change the command ID after deploying
50-
);
37+
`To view or edit a standards information please use /starboard. \nUsage: ${msg.settings.prefix}${this.help.usage}`,
38+
)
39+
.setTimestamp();
5140

52-
return msg.channel.send({ embeds: [embed] });
41+
return msg.channel.send({ embeds: [errorEmbed] });
5342
}
5443

5544
const subCommand = args[0].toLowerCase();
@@ -91,6 +80,10 @@ class Starboard extends Command {
9180
'replied-to': true,
9281
'link-deletes': false,
9382
'link-edits': true,
83+
'autoreact-upvote': true,
84+
'autoreact-downvote': true,
85+
'remove-invalid-reactions': true,
86+
'require-image': false,
9487
messages: {},
9588
});
9689

@@ -113,31 +106,6 @@ class Starboard extends Command {
113106
return msg.channel.send(`Deleted starboard "${name}"!`);
114107
}
115108

116-
case 'list': {
117-
if (Object.keys(starboards).length === 0) {
118-
return msg.channel.send('No starboards have been set up yet!');
119-
}
120-
121-
const embed = new EmbedBuilder()
122-
.setTitle('Server Starboards')
123-
.setColor(msg.settings.embedColor)
124-
.setDescription(
125-
Object.entries(starboards)
126-
.map(([name, config]) => {
127-
return (
128-
`**${name}**\n` +
129-
`Channel: <#${config.channelId}>\n` +
130-
`Threshold: ${config.threshold}\n` +
131-
`Emoji: ${config.emoji}\n` +
132-
`Status: ${config.enabled ? 'Enabled' : 'Disabled'}\n`
133-
);
134-
})
135-
.join('\n'),
136-
);
137-
138-
return msg.channel.send({ embeds: [embed] });
139-
}
140-
141109
default:
142110
return msg.channel.send(
143111
`Invalid subcommand. Use \`${msg.settings.prefix}help starboard\` for more information.`,

0 commit comments

Comments
 (0)