Skip to content

Commit

Permalink
docs(ClientUser): #setPresence does not return a promise (#5485)
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji authored Apr 5, 2021
1 parent 2b52cdc commit 599f0f5
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/structures/ClientUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ class ClientUser extends Structures.get('User') {
* @returns {Presence}
* @example
* // Set the client user's presence
* client.user.setPresence({ activity: { name: 'with discord.js' }, status: 'idle' })
* .then(console.log)
* .catch(console.error);
* client.user.setPresence({ activity: { name: 'with discord.js' }, status: 'idle' });
*/
setPresence(data) {
return this.client.presence.set(data);
Expand All @@ -132,9 +130,7 @@ class ClientUser extends Structures.get('User') {
* @returns {Presence}
* @example
* // Set the client user's status
* client.user.setStatus('idle')
* .then(console.log)
* .catch(console.error);
* client.user.setStatus('idle');
*/
setStatus(status, shardID) {
return this.setPresence({ status, shardID });
Expand All @@ -156,9 +152,7 @@ class ClientUser extends Structures.get('User') {
* @returns {Presence}
* @example
* // Set the client user's activity
* client.user.setActivity('discord.js', { type: 'WATCHING' })
* .then(presence => console.log(`Activity set to ${presence.activities[0].name}`))
* .catch(console.error);
* client.user.setActivity('discord.js', { type: 'WATCHING' });
*/
setActivity(name, options = {}) {
if (!name) return this.setPresence({ activities: null, shardID: options.shardID });
Expand Down

0 comments on commit 599f0f5

Please sign in to comment.