Skip to content

Commit b8791b2

Browse files
authored
Merge pull request #1 from binlabs/feature/attributions
Improved the help embed, made both embeds for consistent
2 parents 4a8ea96 + 999820c commit b8791b2

4 files changed

Lines changed: 23 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ dist
102102

103103
# TernJS port file
104104
.tern-port
105+
images/

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"prefix": "!",
33
"token": "",
44
"adminRoles": ["Queue_Manager"],
5-
"queueTitle": "**__User Queue__**",
5+
"queueTitle": "User Queue",
66
"useEmbeds": true
77
}

index.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,32 @@ let queueMessageId = 0;
1313
let queueMessageText = '';
1414

1515
// -- Constants
16+
// Discord Queue Bot version number
17+
const dqbVersion = process.env.npm_package_version;
1618
// Constant to hold the title of the queue message
1719
const queueMessageTitle = queueTitle;
1820
// Array to hold users in the queue
1921
const usersInQueue = [];
22+
// An embed for the the help command
23+
const embedHelp = new Discord.MessageEmbed()
24+
.setColor('#7ec699')
25+
.setTitle('Queue Commands')
26+
.setAuthor('Discord Queue Bot', 'https://i.imgur.com/yAoS21k.png', 'https://github.com/binlabs/discord-queue-bot')
27+
.setDescription('A list of available commands is available below. Please note that some commands are reserved for queue administators that requre specific roles.')
28+
.addFields(
29+
{ name: 'Join the queue', value: '`!queue join`', inline: false },
30+
{ name: 'Leave the queue', value: '`!queue leave`', inline: false },
31+
{ name: 'See how long you have been in the queue', value: '`!queue time`' , inline: false },
32+
{ name: 'Get a list of available commands', value: '`!queue commands` or `!queue help`', inline: false },
33+
)
34+
.setFooter(`Running Discord Queue Bot v${dqbVersion}\nVisit https://github.com/binlabs/discord-queue-bot for more information.`);
2035
// An embed template for the queue message
2136
const embedQueue = new Discord.MessageEmbed()
22-
.setColor('#BF3EFF')
37+
.setColor('#7ec699')
2338
.setTitle(queueMessageTitle)
24-
.setAuthor('Queue Bot')
39+
.setAuthor('Discord Queue Bot', 'https://i.imgur.com/yAoS21k.png', 'https://github.com/binlabs/discord-queue-bot')
2540
.setDescription(queueMessageText)
26-
.setFooter('Please leave the queue once you have finished your sales.');
41+
.setFooter(`Running Discord Queue Bot v${dqbVersion}\nVisit https://github.com/binlabs/discord-queue-bot for more information.`);
2742

2843
// -- Functions
2944
/**
@@ -329,7 +344,8 @@ client.on('message', message => {
329344

330345
// command: !queue help
331346
if (command === 'queue' && (subcommand === 'help' || subcommand === 'commands')) {
332-
message.channel.send('**Queue Commands**:\n`!queue join`\tJoin the queue\n`!queue leave`\tLeave the queue\n`!queue help` _alias:_ `!queue commands`\tView a list of available commands.\n`!queue time`\tCheck how long you\'ve been in the queue');
347+
message.channel.send(embedHelp);
348+
//message.channel.send('**Queue Commands**:\n`!queue join`\tJoin the queue\n`!queue leave`\tLeave the queue\n`!queue help` _alias:_ `!queue commands`\tView a list of available commands.\n`!queue time`\tCheck how long you\'ve been in the queue');
333349
}
334350
});
335351

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)