mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Gateway v6 support
This commit is contained in:
@@ -802,13 +802,13 @@ var Client = (function (_EventEmitter) {
|
||||
// def createChannel
|
||||
|
||||
Client.prototype.createChannel = function createChannel(server, name) {
|
||||
var type = arguments.length <= 2 || arguments[2] === undefined ? "text" : arguments[2];
|
||||
var type = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];
|
||||
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, channel*/{} : arguments[3];
|
||||
|
||||
if (typeof type === "function") {
|
||||
// options is the callback
|
||||
callback = type;
|
||||
type = "text";
|
||||
type = 0;
|
||||
}
|
||||
|
||||
return this.internal.createChannel(server, name, type).then(dataCallback(callback), errorCallback(callback));
|
||||
|
||||
Reference in New Issue
Block a user