Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit 7abcb04

Browse files
committed
Minor Fix
Accidentally left `this` references in the `messageCreate` event.
1 parent d2f11eb commit 7abcb04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

events/messageCreate.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ module.exports = async (client, message) => {
2121
// returns the prefix. The reason why we used regex here instead of
2222
// message.mentions is because of the mention prefix later on in the
2323
// code, would render it useless.
24-
const prefixMention = new RegExp(`^<@!?${this.client.user.id}> ?$`);
24+
const prefixMention = new RegExp(`^<@!?${client.user.id}> ?$`);
2525
if (message.content.match(prefixMention)) {
2626
return message.reply(`My prefix on this guild is \`${settings.prefix}\``);
2727
}
2828

2929
// It's also good practice to ignore any and all messages that do not start
3030
// with our prefix, or a bot mention.
31-
const prefix = new RegExp(`^<@!?${this.client.user.id}> |^\\${settings.prefix}`).exec(message.content);
31+
const prefix = new RegExp(`^<@!?${client.user.id}> |^\\${settings.prefix}`).exec(message.content);
3232
// This will return and stop the code from continuing if it's missing
3333
// our prefix (be it mention or from the settings).
3434
if (!prefix) return;

0 commit comments

Comments
 (0)