File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type {
2+ ActionRowBuilder ,
3+ Collection ,
4+ EmbedBuilder ,
5+ MessageActionRowComponentBuilder ,
6+ } from 'discord.js' ;
7+
8+ export type ActionBuilders = {
9+ selectRow : ActionRowBuilder < MessageActionRowComponentBuilder > ;
10+ buttonRow : ActionRowBuilder < MessageActionRowComponentBuilder > ;
11+ } ;
12+
13+ export type ProviderConfig < Item = unknown > = {
14+ color : number ;
15+ icon : string ;
16+ commandDescription : string ;
17+ directUrl ?: string ;
18+
19+ getFilteredData : ( query : string ) => Promise < Item [ ] > | Item [ ] ;
20+
21+ createCollection : ( items : Array < Item > ) => Collection < string , Item > ;
22+
23+ createActionBuilders : ( data : Collection < string , Item > ) => ActionBuilders ;
24+
25+ // Create result embeds to show after selection
26+ createResultEmbeds : ( data : Collection < string , Item > ) => EmbedBuilder | EmbedBuilder [ ] ;
27+
28+ // Get display title for an item
29+ getDisplayTitle : ( item : Item ) => string ;
30+
31+ // Get selection content message
32+ getSelectionMessage : ( query : string ) => string ;
33+
34+ // Get display message after selection
35+ getDisplayMessage : ( selectedTitles : string [ ] ) => string ;
36+ } ;
You can’t perform that action at this time.
0 commit comments