Skip to content

Commit 370ad9e

Browse files
committed
Help updated
1 parent 026b2f6 commit 370ad9e

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ A competition management Discord bot.
99
2. [Discord slash commands](#discord-slash-commands)
1010
- [User commands](#user-commands)
1111
- [Admin commands](#admin-commands)
12+
- [Message app commands](#message-app-commands-message-right-click-menu)
1213
3. [Setting up your own CompRetty application](#setting-up-your-own-compretty-application)
1314
1. [Creating a link](#1-creating-a-link)
1415
2. [Setting up the config](#2-setting-up-the-config)
@@ -53,6 +54,12 @@ A competition management Discord bot.
5354
- `/force_start` - Force a game to start.
5455
- `/kick` - Kick player(s) from competition.
5556

57+
#### Message app commands (message right click menu)
58+
59+
- `Kick mentioned player`
60+
- `Remove competition readme`
61+
- `Set competition readme`
62+
5663
## Setting up your own CompRetty application
5764

5865
In case you want to run a bot of your own, you can!

lib/compretty.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ const adminHelpField = '{"name":"Admin commands :crown:","value":"' +
271271
`\`/kick\` - ${kickDesc}` +
272272
'"}';
273273

274+
const messageAppCommandsField = '{"name":"Message app commands :crown: (message right click menu)","value":"' +
275+
'`Kick mentioned player`\\n' +
276+
'`Remove competition readme`\\n' +
277+
'`Set competition readme`' +
278+
'"}';
279+
274280
const defaultTeamFirstWords = [
275281
'Awesome',
276282
'Powerful',
@@ -502,8 +508,8 @@ const formatRole = id => {
502508
}
503509

504510
const getHelpMsg = (isAdmin = false) => {
505-
var _adminHelpField = '';
506-
if (isAdmin) _adminHelpField = adminHelpField;
511+
var fields = '';
512+
if (isAdmin) fields = `,"fields":[${adminHelpField},${messageAppCommandsField}]`;
507513
return (`{"type":4,"data":{"flags":${1 << 6},"embeds":[{` +
508514
'"title":"Command list",' +
509515
`"footer":${JSON.stringify(embedFooter)},` +
@@ -524,8 +530,8 @@ const getHelpMsg = (isAdmin = false) => {
524530
`\`/coin_flip\` - ${coinFlipDesc}\\n` +
525531
`\`/flip\` - ${coinFlipDesc}\\n` +
526532
`\`/coin\` - ${coinFlipHeadsOrTailsDesc}` +
527-
'",' +
528-
`"fields":[${_adminHelpField}]` +
533+
'"' +
534+
fields +
529535
'}]}}');
530536
}
531537

0 commit comments

Comments
 (0)