We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bf8a36 commit 3bab4ecCopy full SHA for 3bab4ec
src/structures/GuildAuditLogs.js
@@ -1,4 +1,5 @@
1
const Collection = require('../util/Collection');
2
+const Snowflake = require('../util/Snowflake');
3
4
const Targets = {
5
GUILD: 'GUILD',
@@ -226,6 +227,24 @@ class GuildAuditLogsEntry {
226
227
this.target = guild[`${targetType.toLowerCase()}s`].get(data.target_id);
228
}
229
230
+
231
+ /**
232
+ * The timestamp this entry was created at
233
+ * @type {number}
234
+ * @readonly
235
+ */
236
+ get createdTimestamp() {
237
+ return Snowflake.deconstruct(this.id).timestamp;
238
+ }
239
240
241
+ * The time this entry was created
242
+ * @type {Date}
243
244
245
+ get createdAt() {
246
+ return new Date(this.createdTimestamp);
247
248
249
250
GuildAuditLogs.Actions = Actions;
0 commit comments