pass through used prefix to commands
This commit is contained in:
parent
6d57803fe8
commit
678f96a16b
1 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,11 @@ class MessageHandler {
|
||||||
// Ignore the message if it doesn't start with a valid prefix
|
// Ignore the message if it doesn't start with a valid prefix
|
||||||
if (!prefix) return;
|
if (!prefix) return;
|
||||||
|
|
||||||
|
// Save prefix so we can use it later (mostly for help command)
|
||||||
|
if (prefix === `<@${this.client.user.id}> ` || prefix === `<@!${this.client.user.id}> `) {
|
||||||
|
message.prefix = '@Woomy ';
|
||||||
|
} else (message.prefix = prefix);
|
||||||
|
|
||||||
// Turn the message content into an array (excluding the prefix)
|
// Turn the message content into an array (excluding the prefix)
|
||||||
const args = message.content.slice(prefix.length).trim().split(/ +/g);
|
const args = message.content.slice(prefix.length).trim().split(/ +/g);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue