@zoodogood/utils 1.0.8-change.941 → 1.0.9-change.946
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.
|
@@ -4,7 +4,14 @@ export type APIBaseButton = import("discord-api-types/v10").APIButtonComponentBa
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @param {APIBaseButton} resolable
|
|
7
|
+
* @param {APIBaseButton[]} resolable
|
|
8
8
|
*/
|
|
9
|
-
export function justButtonComponents(resolable: import("discord-api-types/v10").APIButtonComponentBase<any>):
|
|
9
|
+
export function justButtonComponents(resolable: import("discord-api-types/v10").APIButtonComponentBase<any>[]): {
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
style: any;
|
|
12
|
+
emoji?: import("discord-api-types/v10").APIMessageComponentEmoji | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
type: import("discord-api-types/v10").ComponentType.Button;
|
|
15
|
+
customId: string;
|
|
16
|
+
}[];
|
|
10
17
|
export function justSendMessage(target: any, options: any): Promise<any>;
|
package/lib/discordjs/helpers.js
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { BaseInteraction, ButtonStyle, ComponentType } from "discord.js";
|
|
11
|
-
import {
|
|
11
|
+
import { CreateMessage } from "./simplify.js";
|
|
12
12
|
const DEFAULTS_FOR_BUTTON = {
|
|
13
13
|
type: ComponentType.Button,
|
|
14
14
|
style: ButtonStyle.Secondary,
|
|
@@ -18,11 +18,11 @@ const DEFAULTS_FOR_BUTTON = {
|
|
|
18
18
|
*/
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @param {APIBaseButton} resolable
|
|
21
|
+
* @param {APIBaseButton[]} resolable
|
|
22
22
|
*/
|
|
23
23
|
function justButtonComponents(resolable) {
|
|
24
24
|
const buttons = resolable.map((data, i) => (Object.assign(Object.assign(Object.assign({}, DEFAULTS_FOR_BUTTON), { customId: `button.${i + 1}` }), data)));
|
|
25
|
-
return
|
|
25
|
+
return buttons;
|
|
26
26
|
}
|
|
27
27
|
function justSendMessage(target, options) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|