mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
sendMessage now also takes a Message instead of a Channel if wanted
To help reduce verbosity
This commit is contained in:
parent
04872a4397
commit
e1ada38234
1 changed files with 4 additions and 0 deletions
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() {};
|
||||
|
||||
if ( _mentions === false ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue