Browse Source

Fix user string representation

horse 5 years ago
parent
commit
ffdcaf2e37
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bot/src/main.ts

+ 1 - 1
bot/src/main.ts

@@ -73,7 +73,7 @@ client.on("message", async m => {
 
     if (m.mentions.users.size > 0 && m.mentions.users.has(client.user.id)) {
 
-        if (m.content.trim().startsWith(client.user.toString())) {
+        if (m.content.trim().startsWith(`<@${client.user.id}>`) || m.content.trim().startsWith(`<@!${client.user.id}>`)) {
             content = content.substring(`@${client.user.username}`.length).trim();
 
             let lowerCaseContent = content.toLowerCase();