mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +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() {};
|
var cb = cb || function() {};
|
||||||
|
|
||||||
if ( _mentions === false ) {
|
if ( _mentions === false ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue