mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 05:52:05 +00:00
Caching Server now gets actual ID
This commit is contained in:
parent
e4723c7dfe
commit
a0d4fa930c
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
|
@ -58,7 +58,7 @@ exports.Client.prototype.cacheServer = function( id, cb, members ) {
|
||||||
.set( "authorization", this.token )
|
.set( "authorization", this.token )
|
||||||
.end( function( err, res ) {
|
.end( function( err, res ) {
|
||||||
var dat = res.body;
|
var dat = res.body;
|
||||||
var server = new Server( dat.region, dat.owner_id, dat.name, dat.roles[ 0 ].id, members || dat.members, dat.icon, dat.afk_timeout, dat.afk_channel_id );
|
var server = new Server( dat.region, dat.owner_id, dat.name, id, members || dat.members, dat.icon, dat.afk_timeout, dat.afk_channel_id );
|
||||||
|
|
||||||
request
|
request
|
||||||
.get( Endpoints.SERVERS + "/" + id + "/channels" )
|
.get( Endpoints.SERVERS + "/" + id + "/channels" )
|
||||||
|
|
@ -458,7 +458,7 @@ exports.Client.prototype.sendMessage = function( channel, message, cb, _mentions
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.Client.prototype.deleteMessage = function( message ) {
|
exports.Client.prototype.deleteMessage = function( message, cb ) {
|
||||||
|
|
||||||
if ( !message )
|
if ( !message )
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -468,7 +468,7 @@ exports.Client.prototype.deleteMessage = function( message ) {
|
||||||
request
|
request
|
||||||
.del( Endpoints.CHANNELS + "/" + message.channel.id + "/messages/" + message.id )
|
.del( Endpoints.CHANNELS + "/" + message.channel.id + "/messages/" + message.id )
|
||||||
.set( "authorization", client.token )
|
.set( "authorization", client.token )
|
||||||
.end( function( err, res ) {} );
|
.end( cb );
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.Client.prototype.channelFromId = function( id ) {
|
exports.Client.prototype.channelFromId = function( id ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue