@elara-services/tickets 4.0.9 → 4.1.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.
Files changed (2) hide show
  1. package/index.d.ts +18 -11
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,9 +1,19 @@
1
1
  declare module "@elara-services/tickets" {
2
-
2
+
3
3
  import type { Client, MessageOptions, GuildMember, Guild, User, TextBasedChannel, Message, Interaction } from "discord.js";
4
4
 
5
5
  export type Langs = "en-US";
6
6
 
7
+ export interface TicketModalQuestion {
8
+ label: string;
9
+ style: 1 | 2;
10
+ placeholder?: string;
11
+ value?: string;
12
+ required?: boolean;
13
+ min_length?: number;
14
+ max_length?: number;
15
+ }
16
+
7
17
  export interface TicketOptions {
8
18
  client: Client;
9
19
  prefix: string;
@@ -24,15 +34,7 @@ declare module "@elara-services/tickets" {
24
34
  modal?: {
25
35
  enabled?: boolean;
26
36
  title?: string;
27
- questions?: {
28
- label: string;
29
- style: 1 | 2;
30
- placeholder?: string;
31
- value?: string;
32
- required?: boolean;
33
- min_length?: number;
34
- max_length?: number;
35
- }[]
37
+ questions?: TicketModalQuestion[]
36
38
  };
37
39
  webhook?: {
38
40
  id?: string;
@@ -123,6 +125,11 @@ declare module "@elara-services/tickets" {
123
125
 
124
126
  private _debug(...args: unknown[]): unknown;
125
127
 
128
+ public get manage(): {
129
+ add(channelId: string, userId: string, permType: "member" | "mod"): Promise<{ status: boolean, message: string }>;
130
+ remove(channelId: string, userId: string): Promise<{ status: boolean, message: string }>;
131
+ };
132
+
126
133
  public get webhookOptions(): {
127
134
  id: string | undefined;
128
135
  token: string | undefined;
@@ -141,7 +148,7 @@ declare module "@elara-services/tickets" {
141
148
  public button(options: { style: 1 | 2 | 3 | 4 | 5 | number, id?: string, label?: string, emoji?: { name?: string, id?: string } }): { type: number, custom_id: string, style: number, label?: string, emoji?: { name?: string, id?: string } }
142
149
  public closeTicket(options: {
143
150
  member: GuildMember,
144
- guild: Guild,
151
+ guild: Guild,
145
152
  user: User,
146
153
  messages: Message[],
147
154
  channel: TextBasedChannel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elara-services/tickets",
3
- "version": "4.0.9",
3
+ "version": "4.1.1",
4
4
  "description": "Helper for tickets",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",