mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-11-25 14:42:44 +01:00
Compare commits
No commits in common. "67b9c1284367a6d9eaa648975d30fca2b3ec684f" and "a6dad6b4c79434d0f5dc92b72825a7d6557d9280" have entirely different histories.
67b9c12843
...
a6dad6b4c7
@ -48,16 +48,6 @@ const STATE = (function() {
|
||||
});
|
||||
};
|
||||
|
||||
const getDate = function(date) {
|
||||
if (date instanceof Date) {
|
||||
return date;
|
||||
}
|
||||
else {
|
||||
// noinspection JSUnresolvedReference
|
||||
return date.toDate();
|
||||
}
|
||||
};
|
||||
|
||||
const trackingStateChangedListeners = [];
|
||||
let isTracking = false;
|
||||
|
||||
@ -79,8 +69,8 @@ const STATE = (function() {
|
||||
* @property {String} channel_id
|
||||
* @property {DiscordUser} author
|
||||
* @property {String} content
|
||||
* @property {Date} timestamp
|
||||
* @property {Date|null} editedTimestamp
|
||||
* @property {Timestamp} timestamp
|
||||
* @property {Timestamp|null} editedTimestamp
|
||||
* @property {DiscordAttachment[]} attachments
|
||||
* @property {Object[]} embeds
|
||||
* @property {DiscordMessageReaction[]} [reactions]
|
||||
@ -116,6 +106,11 @@ const STATE = (function() {
|
||||
* @property {Boolean} animated
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name Timestamp
|
||||
* @property {Function} toDate
|
||||
*/
|
||||
|
||||
return {
|
||||
setup(port, token) {
|
||||
serverPort = port;
|
||||
@ -228,12 +223,12 @@ const STATE = (function() {
|
||||
sender: msg.author.id,
|
||||
channel: msg.channel_id,
|
||||
text: msg.content,
|
||||
timestamp: getDate(msg.timestamp).getTime()
|
||||
timestamp: msg.timestamp.toDate().getTime()
|
||||
};
|
||||
|
||||
if (msg.editedTimestamp !== null) {
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
obj.editTimestamp = getDate(msg.editedTimestamp).getTime();
|
||||
obj.editTimestamp = msg.editedTimestamp.toDate().getTime();
|
||||
}
|
||||
|
||||
if (msg.messageReference !== null) {
|
||||
|
@ -8,5 +8,5 @@ using DHT.Utils;
|
||||
namespace DHT.Utils;
|
||||
|
||||
static class Version {
|
||||
public const string Tag = "41.1.0.0";
|
||||
public const string Tag = "41.0.0.0";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user