Fix message author fails when Titan is nicknamed

This commit is contained in:
Jeremy Zhang 2017-12-10 21:32:32 +00:00
parent 8c414247b9
commit 2d969659ec

View File

@ -810,6 +810,7 @@
message.content = message.content.substring(usernamefield.length + 7); message.content = message.content.substring(usernamefield.length + 7);
} }
message.author.username = usernamefield.split("#")[0]; message.author.username = usernamefield.split("#")[0];
message.author.nickname = null;
message.author.discriminator = usernamefield.split("#")[1]; message.author.discriminator = usernamefield.split("#")[1];
} else if (message.author.bot && message.author.discriminator == "0000" && message.author.username.substring(message.author.username.length-5, message.author.username.length-4) == "#") { } else if (message.author.bot && message.author.discriminator == "0000" && message.author.username.substring(message.author.username.length-5, message.author.username.length-4) == "#") {
var namestr = message.author.username; var namestr = message.author.username;