Skip to content

Commit

Permalink
2.0.1 fixes with the new wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Dec 8, 2016
1 parent 8150e71 commit 97f85a8
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-rpc",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple RPC client for Discord somewhat stolen from the Discord StreamKit.",
"main": "src/index.js",
"repository": {
Expand Down
18 changes: 9 additions & 9 deletions src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_GUILD', { guild_id: id, timeout }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -27,7 +27,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_GUILDS', {}, (err, res) => {
if (err) reject(err);
resolve(res.data.guilds);
resolve(res.guilds);
});
});
}
Expand All @@ -36,7 +36,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_CHANNEL', { channel_id: id, timeout }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -45,7 +45,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_CHANNELS', {}, (err, res) => {
if (err) reject(err);
resolve(res.data.channels);
resolve(res.channels);
});
});
}
Expand All @@ -54,7 +54,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SET_USER_VOICE_SETTINGS', args, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -63,7 +63,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SELECT_VOICE_CHANNEL', { channel_id: id, timeout, force }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -72,7 +72,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SELECT_TEXT_CHANNEL', { channel_id: id, timeout, force }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -81,7 +81,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_VOICE_SETTINGS', {}, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -90,7 +90,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SET_VOICE_SETTINGS', args, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand Down
20 changes: 10 additions & 10 deletions webpack/rpc.2.0.0.es6.js → webpack/rpc.2.0.1.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ module.exports = isObject;

module.exports = {
"name": "discord-rpc",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple RPC client for Discord somewhat stolen from the Discord StreamKit.",
"main": "src/index.js",
"repository": {
Expand Down Expand Up @@ -1922,7 +1922,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_GUILD', { guild_id: id, timeout }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -1931,7 +1931,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_GUILDS', {}, (err, res) => {
if (err) reject(err);
resolve(res.data.guilds);
resolve(res.guilds);
});
});
}
Expand All @@ -1940,7 +1940,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_CHANNEL', { channel_id: id, timeout }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -1949,7 +1949,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_CHANNELS', {}, (err, res) => {
if (err) reject(err);
resolve(res.data.channels);
resolve(res.channels);
});
});
}
Expand All @@ -1958,7 +1958,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SET_USER_VOICE_SETTINGS', args, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -1967,7 +1967,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SELECT_VOICE_CHANNEL', { channel_id: id, timeout, force }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -1976,7 +1976,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SELECT_TEXT_CHANNEL', { channel_id: id, timeout, force }, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -1985,7 +1985,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('GET_VOICE_SETTINGS', {}, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -1994,7 +1994,7 @@ class Client extends EventEmitter {
return new Promise((resolve, reject) => {
this.rpc.request('SET_VOICE_SETTINGS', args, (err, res) => {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand Down

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions webpack/rpc.2.0.0.js → webpack/rpc.2.0.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this2.rpc.request('GET_GUILD', { guild_id: id, timeout: timeout }, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -2044,7 +2044,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this3.rpc.request('GET_GUILDS', {}, function (err, res) {
if (err) reject(err);
resolve(res.data.guilds);
resolve(res.guilds);
});
});
}
Expand All @@ -2056,7 +2056,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this4.rpc.request('GET_CHANNEL', { channel_id: id, timeout: timeout }, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -2068,7 +2068,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this5.rpc.request('GET_CHANNELS', {}, function (err, res) {
if (err) reject(err);
resolve(res.data.channels);
resolve(res.channels);
});
});
}
Expand All @@ -2080,7 +2080,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this6.rpc.request('SET_USER_VOICE_SETTINGS', args, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -2094,7 +2094,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this7.rpc.request('SELECT_VOICE_CHANNEL', { channel_id: id, timeout: timeout, force: force }, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -2108,7 +2108,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this8.rpc.request('SELECT_TEXT_CHANNEL', { channel_id: id, timeout: timeout, force: force }, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -2120,7 +2120,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this9.rpc.request('GET_VOICE_SETTINGS', {}, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand All @@ -2132,7 +2132,7 @@ var Client = function (_EventEmitter) {
return new Promise(function (resolve, reject) {
_this10.rpc.request('SET_VOICE_SETTINGS', args, function (err, res) {
if (err) reject(err);
resolve(res.data);
resolve(res);
});
});
}
Expand Down Expand Up @@ -2164,7 +2164,7 @@ module.exports = Client;

module.exports = {
"name": "discord-rpc",
"version": "2.0.0",
"version": "2.0.1",
"description": "A simple RPC client for Discord somewhat stolen from the Discord StreamKit.",
"main": "src/index.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions webpack/rpc.2.0.0.min.js → webpack/rpc.2.0.1.min.js

Large diffs are not rendered by default.

0 comments on commit 97f85a8

Please sign in to comment.