BUGFIX: Replaced userID with user in messaging.js

This commit is contained in:
2018-10-19 06:25:23 +11:00
parent 9b627d3581
commit 31a13e000d
2 changed files with 6 additions and 6 deletions

View File

@@ -12,16 +12,16 @@ exports.SendPublicMessage = function(client, user, channel, message, typingDelay
if (message === undefined) {
message = channel;
channel = user;
userID = null;
user = null;
}
//handle user strings
if (typeof(user) == "string") {
if (typeof(user) === "string") {
user = client.users.find(item => item.username === user);
}
//handle channel strings
if (typeof(channel) == "string") {
if (typeof(channel) === "string") {
channel = client.channels.find(item => item.name === channel);
}
@@ -48,7 +48,7 @@ exports.SendPublicMessage = function(client, user, channel, message, typingDelay
//message - message to send
exports.SendPrivateMessage = function(client, user, message) {
//handle user strings
if (typeof(user) == "string") {
if (typeof(user) === "string") {
user = client.users.find(item => item.username === user);
}