mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Added support for new game objects (#332)
bot.setStreaming(name, url, type, callback); added logic for Internal setStatus updated to check if string or object
This commit is contained in:
@@ -1112,6 +1112,12 @@ var Client = (function (_EventEmitter) {
|
||||
return this.setStatus(null, game, callback);
|
||||
};
|
||||
|
||||
Client.prototype.setStreaming = function setStreaming(name, url, type) {
|
||||
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, {}*/{} : arguments[3];
|
||||
|
||||
return this.setStatus(null, { name: name, url: url, type: type }, callback);
|
||||
};
|
||||
|
||||
//def forceFetchUsers
|
||||
|
||||
Client.prototype.forceFetchUsers = function forceFetchUsers(callback) {
|
||||
|
||||
@@ -1385,9 +1385,7 @@ var InternalClient = (function () {
|
||||
this.idleStatus = this.idleStatus || null; //undefined
|
||||
}
|
||||
|
||||
this.game = game === null ? null : !game ? this.game || null : {
|
||||
name: game
|
||||
};
|
||||
this.game = game === null ? null : !game ? this.game || null : typeof game === "string" ? { name: game } : game;
|
||||
|
||||
var packet = {
|
||||
op: 3,
|
||||
|
||||
Reference in New Issue
Block a user