mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
sendMessage now also takes a Message instead of a Channel if wanted
To help reduce verbosity
This commit is contained in:
4
index.js
4
index.js
@@ -383,6 +383,10 @@ exports.Client.prototype.sendMessage = function( channel, message, cb, _mentions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( channel instanceof Message ){
|
||||||
|
channel = channel.channel;
|
||||||
|
}
|
||||||
|
|
||||||
var cb = cb || function() {};
|
var cb = cb || function() {};
|
||||||
|
|
||||||
if ( _mentions === false ) {
|
if ( _mentions === false ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user