mirror of
https://github.com/Ratstail91/SANCTUM.git
synced 2025-11-29 02:24:27 +11:00
Quick bugfix
This commit is contained in:
@@ -18,11 +18,17 @@ exports.SendPublicMessage = function(client, user, channel, message, typingDelay
|
||||
//handle user strings
|
||||
if (typeof(user) === "string") {
|
||||
user = client.users.find(item => item.username === user);
|
||||
if (!user) {
|
||||
throw "Can't find that user";
|
||||
}
|
||||
}
|
||||
|
||||
//handle channel strings
|
||||
if (typeof(channel) === "string") {
|
||||
channel = client.channels.find(item => item.name === channel);
|
||||
if (!channel) {
|
||||
throw "Can't find that channel";
|
||||
}
|
||||
}
|
||||
|
||||
//Utility trick: @user
|
||||
|
||||
Reference in New Issue
Block a user