Prepare for upcoming leave/deleteServer separation (fix #198)

This commit is contained in:
abalabahaha
2016-03-06 13:14:15 -08:00
parent 4e58de8cd6
commit b5c200901b
6 changed files with 189 additions and 134 deletions

View File

@@ -628,7 +628,7 @@ var Client = (function (_EventEmitter) {
};
/**
* Leaves a Discord Server, alias to `client.leaveServer`
* Deletes a Discord Server
* @param {ServerResolvable} server the server to leave
* @param {function(err: Error)} [callback] callback to the method
* @returns {Promise<null, Error>} resolves null if successful, otherwise rejects with an error.
@@ -637,7 +637,7 @@ var Client = (function (_EventEmitter) {
Client.prototype.deleteServer = function deleteServer(server) {
var callback = arguments.length <= 1 || arguments[1] === undefined ? function () /*err, {}*/{} : arguments[1];
return this.internal.leaveServer(server).then(dataCallback(callback), errorCallback(callback));
return this.internal.deleteServer(server).then(dataCallback(callback), errorCallback(callback));
};
// def createChannel