Skip to content

Commit

Permalink
Revert "feat(Activity): support for CUSTOM_STATUS activity type (disc…
Browse files Browse the repository at this point in the history
…ordjs#3353)"

This reverts commit 5b43ddc.
  • Loading branch information
samsamson33 authored Feb 27, 2020
1 parent 35c1abc commit 1118180
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
22 changes: 0 additions & 22 deletions src/structures/Presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const Util = require('../util/Util');
const ActivityFlags = require('../util/ActivityFlags');
const { ActivityTypes } = require('../util/Constants');
const Emoji = require('./Emoji');

/**
* Activity sent in a message.
Expand Down Expand Up @@ -206,18 +205,6 @@ class Activity {
* @type {Readonly<ActivityFlags>}
*/
this.flags = new ActivityFlags(data.flags).freeze();

/**
* Emoji for a custom activity
* @type {?Emoji}
*/
this.emoji = data.emoji ? new Emoji(presence.client, data.emoji) : null;

/**
* Creation date of the activity
* @type {number}
*/
this.createdTimestamp = new Date(data.created_at).getTime();
}

/**
Expand All @@ -234,15 +221,6 @@ class Activity {
);
}

/**
* The time the activity was created at
* @type {Date}
* @readonly
*/
get createdAt() {
return new Date(this.createdTimestamp);
}

/**
* When concatenated with a string, this automatically returns the activities' name instead of the Activity object.
* @returns {string}
Expand Down
2 changes: 0 additions & 2 deletions src/util/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,13 @@ exports.MessageTypes = [
* * STREAMING
* * LISTENING
* * WATCHING
* * CUSTOM_STATUS
* @typedef {string} ActivityType
*/
exports.ActivityTypes = [
'PLAYING',
'STREAMING',
'LISTENING',
'WATCHING',
'CUSTOM_STATUS',
];

exports.ChannelTypes = {
Expand Down
6 changes: 1 addition & 5 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ declare module 'discord.js' {
constructor(presence: Presence, data?: object);
public applicationID: Snowflake | null;
public assets: RichPresenceAssets | null;
public readonly createdAt: Date;
public createdTimestamp: number;
public details: string | null;
public emoji: Emoji | null;
public name: string;
public party: {
id: string | null;
Expand Down Expand Up @@ -1916,8 +1913,7 @@ declare module 'discord.js' {
type ActivityType = 'PLAYING'
| 'STREAMING'
| 'LISTENING'
| 'WATCHING'
| 'CUSTOM_STATUS';
| 'WATCHING';

type MessageFlagsString = 'CROSSPOSTED'
| 'IS_CROSSPOST'
Expand Down

0 comments on commit 1118180

Please sign in to comment.