@minesa-org/mini-interaction 0.3.2 → 0.3.3
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export var InteractionFlags;
|
|
2
2
|
(function (InteractionFlags) {
|
|
3
3
|
InteractionFlags[InteractionFlags["Ephemeral"] = 64] = "Ephemeral";
|
|
4
|
-
InteractionFlags[InteractionFlags["IsComponentsV2"] =
|
|
4
|
+
InteractionFlags[InteractionFlags["IsComponentsV2"] = 32768] = "IsComponentsV2";
|
|
5
5
|
InteractionFlags[InteractionFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds";
|
|
6
6
|
})(InteractionFlags || (InteractionFlags = {}));
|
|
7
7
|
/** @deprecated Use InteractionFlags instead. */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { resolveJSONEncodable } from "../builders/shared.js";
|
|
2
2
|
import { ComponentType, } from "discord-api-types/v10";
|
|
3
|
-
import { InteractionFlags } from "../types/InteractionFlags.js";
|
|
4
3
|
const COMPONENTS_V2_TYPES = new Set([
|
|
5
4
|
ComponentType.Container,
|
|
6
5
|
ComponentType.Section,
|
|
@@ -59,7 +58,7 @@ export function normaliseInteractionMessageData(data) {
|
|
|
59
58
|
if (responseData.components && Array.isArray(responseData.components)) {
|
|
60
59
|
if (containsComponentsV2(responseData.components)) {
|
|
61
60
|
const currentFlags = responseData.flags ?? 0;
|
|
62
|
-
responseData.flags = (currentFlags |
|
|
61
|
+
responseData.flags = (currentFlags | (0x1 << 15));
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
return responseData;
|
package/package.json
CHANGED