mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-12-23 03:15:43 +00:00
Corrected rules command to parse message lowercased.
This commit is contained in:
parent
97efa5710b
commit
cf25097095
|
@ -96,7 +96,7 @@ client.on('message', message => {
|
||||||
|
|
||||||
// Check if the channel is #rules, if so we want to follow a different logic flow.
|
// Check if the channel is #rules, if so we want to follow a different logic flow.
|
||||||
if (message.channel.id === process.env.DISCORD_RULES_CHANNEL) {
|
if (message.channel.id === process.env.DISCORD_RULES_CHANNEL) {
|
||||||
if (message.content.includes(process.env.DISCORD_RULES_TRIGGER)) {
|
if (message.content.toLowerCase().includes(process.env.DISCORD_RULES_TRIGGER)) {
|
||||||
// We want to remove the 'Unauthorized' role from them once they agree to the rules.
|
// We want to remove the 'Unauthorized' role from them once they agree to the rules.
|
||||||
logger.verbose(`${message.author.username} ${message.author} has accepted the rules, removing role ${process.env.DISCORD_RULES_ROLE}.`);
|
logger.verbose(`${message.author.username} ${message.author} has accepted the rules, removing role ${process.env.DISCORD_RULES_ROLE}.`);
|
||||||
state.stats.ruleAccepts += 1;
|
state.stats.ruleAccepts += 1;
|
||||||
|
|
Loading…
Reference in a new issue