mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
14
index.js
14
index.js
@@ -149,6 +149,16 @@ exports.Client.prototype.getChannel = function( id ) {
|
|||||||
return this.getChannels().filter( "id", id, true );
|
return this.getChannels().filter( "id", id, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Channel matching the given name, or false if not found. Will return false if the Channel is not cached or not available.
|
||||||
|
* @method getChannelByName
|
||||||
|
* @param {String/Number} name The Name of the Channel
|
||||||
|
* @return {Server} The Channel matching the Name
|
||||||
|
*/
|
||||||
|
exports.Client.prototype.getChannelByName = function( name ) {
|
||||||
|
return this.getChannels().filter( "name", name, true );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggers an .on() event.
|
* Triggers an .on() event.
|
||||||
* @param {String} event The event to be triggered
|
* @param {String} event The event to be triggered
|
||||||
@@ -1024,6 +1034,10 @@ exports.Client.prototype.getChannel = function( id ) {
|
|||||||
return normalChan || this.PMList.filter( "id", id, true );
|
return normalChan || this.PMList.filter( "id", id, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.Client.prototype.getChannelByName = function( name ) {
|
||||||
|
return this.getChannels().filter( "name", name, true );
|
||||||
|
}
|
||||||
|
|
||||||
exports.Client.prototype.getUser = function( id ) {
|
exports.Client.prototype.getUser = function( id ) {
|
||||||
return this.getUsers().filter( "id", id, true );
|
return this.getUsers().filter( "id", id, true );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user