lolka.js 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "lolka.js",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"description": "A powerful library for interacting with the lolka bot API (discord.js-compatible fork)",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "node ./scripts/esmDts.mjs",
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const { deprecate } = require('node:util');
|
|
4
4
|
const { Collection } = require('@discordjs/collection');
|
|
5
|
-
const { DiscordSnowflake } = require('../util/LolkaSnowflake');
|
|
6
5
|
const { InteractionType, ApplicationCommandType, ComponentType } = require('discord-api-types/v10');
|
|
7
6
|
const Base = require('./Base');
|
|
8
7
|
const { SelectMenuTypes } = require('../util/Constants');
|
|
@@ -136,7 +135,9 @@ class BaseInteraction extends Base {
|
|
|
136
135
|
* @readonly
|
|
137
136
|
*/
|
|
138
137
|
get createdTimestamp() {
|
|
139
|
-
|
|
138
|
+
// interaction ID сервер генерит в Discord-раскладке (сдвиг 22, эпоха 2015),
|
|
139
|
+
// декодируем соответственно, а не по lolka-раскладке.
|
|
140
|
+
return Number((BigInt(this.id) >> 22n) + 1420070400000n);
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
/**
|