Skip to content

Commit b985253

Browse files
committed
Updated types
1 parent d3c73de commit b985253

File tree

1 file changed

+152
-152
lines changed

1 file changed

+152
-152
lines changed

src/structure/types.ts

Lines changed: 152 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,166 @@
11
/* Licensed under Apache License 2.0: https://github.com/Sayrix/Ticket-Bot/blob/typescript/LICENSE */
22

3-
import {ColorResolvable} from "discord.js";
3+
import { ColorResolvable } from "discord.js";
44

55
export type ConfigType = {
6-
clientId: string;
7-
guildId: string;
8-
mainColor: ColorResolvable;
9-
lang: string; // Tho can be cs/de/es/fr/main/tr type but we can't guarantee what users put
10-
closeTicketCategoryId: string;
11-
openTicketChannelId: string;
12-
ticketTypes: TicketType[];
13-
ticketNameOption: string;
14-
claimOption: {
15-
claimButton: boolean;
16-
nameWhenClaimed?: string;
17-
categoryWhenClaimed?: string;
18-
};
19-
rolesWhoHaveAccessToTheTickets: string[];
20-
rolesWhoCanNotCreateTickets: string[];
21-
pingRoleWhenOpened: boolean;
22-
roleToPingWhenOpenedId: string[];
23-
logs: boolean;
24-
logsChannelId: string;
25-
closeOption: {
26-
closeButton: boolean;
27-
dmUser: boolean;
28-
createTranscript: boolean;
29-
askReason: boolean;
30-
whoCanCloseTicket: "STAFFONLY" | "EVERYONE";
31-
closeTicketCategoryId?: string;
32-
deleteTicket: boolean,
33-
};
34-
uuidType: "uuid" | "emoji";
35-
status: {
36-
enabled: boolean;
37-
text: string;
38-
type: "PLAYING" | "STREAMING"| "LISTENING" | "WATCHING" | "COMPETING",
39-
url?: string,
40-
status: "online"
41-
},
42-
maxTicketOpened: number;
43-
minimalTracking: boolean;
44-
showWSLog: boolean;
45-
}
6+
clientId: string;
7+
guildId: string;
8+
mainColor: ColorResolvable;
9+
lang: string; // Tho can be cs/de/es/fr/main/tr type but we can't guarantee what users put
10+
closeTicketCategoryId: string;
11+
openTicketChannelId: string;
12+
ticketTypes: TicketType[];
13+
ticketNameOption: string;
14+
claimOption: {
15+
claimButton: boolean;
16+
nameWhenClaimed?: string;
17+
categoryWhenClaimed?: string;
18+
};
19+
rolesWhoHaveAccessToTheTickets: string[];
20+
rolesWhoCanNotCreateTickets: string[];
21+
pingRoleWhenOpened: boolean;
22+
roleToPingWhenOpenedId: string[];
23+
logs: boolean;
24+
logsChannelId: string;
25+
closeOption: {
26+
closeButton: boolean;
27+
dmUser: boolean;
28+
createTranscript: boolean;
29+
askReason: boolean;
30+
whoCanCloseTicket: "STAFFONLY" | "EVERYONE";
31+
closeTicketCategoryId?: string;
32+
deleteTicket: boolean;
33+
};
34+
uuidType: "uuid" | "emoji";
35+
status: {
36+
enabled: boolean;
37+
text: string;
38+
type: "PLAYING" | "STREAMING" | "LISTENING" | "WATCHING" | "COMPETING" | "CUSTOM";
39+
url?: string;
40+
status: "online";
41+
};
42+
maxTicketOpened: number;
43+
minimalTracking: boolean;
44+
showWSLog: boolean;
45+
};
4646

4747
export type LocaleType = {
48-
embeds: {
49-
openTicket: {
50-
title: string,
51-
color?: ColorResolvable,
52-
description: string,
53-
footer: {
54-
text: string
55-
}
56-
},
57-
ticketOpened: {
58-
title: string,
59-
description: string,
60-
footer: {
61-
text: string,
62-
iconUrl?: string
63-
}
64-
},
65-
ticketClosed: {
66-
title: string,
67-
description: string
68-
},
69-
ticketClosedDM: {
70-
title: string,
71-
color?: ColorResolvable,
72-
description: string,
73-
footer: {
74-
text: string,
75-
iconUrl?: string
76-
}
77-
}
78-
},
79-
modals: {
80-
reasonTicketOpen: {
81-
title: string,
82-
label: string,
83-
placeholder: string
84-
},
85-
reasonTicketClose: {
86-
title: string,
87-
label: string,
88-
placeholder: string
89-
}
90-
},
91-
buttons: {
92-
close: {
93-
label: string,
94-
emoji: string
95-
},
96-
claim: {
97-
label: string,
98-
emoji: string
99-
}
100-
},
101-
invalidConfig: string;
102-
ticketOpenedMessage: string,
103-
ticketOnlyClaimableByStaff: string,
104-
ticketAlreadyClaimed: string,
105-
ticketClaimedMessage: string,
106-
ticketOnlyClosableByStaff: string,
107-
ticketOnlyRenamableByStaff: string;
108-
ticketRenamed: string;
109-
noTickets: string;
110-
ticketAlreadyClosed: string,
111-
ticketCreatingTranscript: string,
112-
ticketTranscriptCreated: string,
113-
ticketLimitReached: string,
48+
embeds: {
49+
openTicket: {
50+
title: string;
51+
color?: ColorResolvable;
52+
description: string;
53+
footer: {
54+
text: string;
55+
};
56+
};
57+
ticketOpened: {
58+
title: string;
59+
description: string;
60+
footer: {
61+
text: string;
62+
iconUrl?: string;
63+
};
64+
};
65+
ticketClosed: {
66+
title: string;
67+
description: string;
68+
};
69+
ticketClosedDM: {
70+
title: string;
71+
color?: ColorResolvable;
72+
description: string;
73+
footer: {
74+
text: string;
75+
iconUrl?: string;
76+
};
77+
};
78+
};
79+
modals: {
80+
reasonTicketOpen: {
81+
title: string;
82+
label: string;
83+
placeholder: string;
84+
};
85+
reasonTicketClose: {
86+
title: string;
87+
label: string;
88+
placeholder: string;
89+
};
90+
};
91+
buttons: {
92+
close: {
93+
label: string;
94+
emoji: string;
95+
};
96+
claim: {
97+
label: string;
98+
emoji: string;
99+
};
100+
};
101+
invalidConfig: string;
102+
ticketOpenedMessage: string;
103+
ticketOnlyClaimableByStaff: string;
104+
ticketAlreadyClaimed: string;
105+
ticketClaimedMessage: string;
106+
ticketOnlyClosableByStaff: string;
107+
ticketOnlyRenamableByStaff: string;
108+
ticketRenamed: string;
109+
noTickets: string;
110+
ticketAlreadyClosed: string;
111+
ticketCreatingTranscript: string;
112+
ticketTranscriptCreated: string;
113+
ticketLimitReached: string;
114114

115-
other: {
116-
openTicketButtonMSG: string,
117-
deleteTicketButtonMSG: string,
118-
selectTicketTypePlaceholder: string,
119-
claimedBy: string,
120-
noReasonGiven: string,
121-
unavailable: string
122-
}
123-
}
115+
other: {
116+
openTicketButtonMSG: string;
117+
deleteTicketButtonMSG: string;
118+
selectTicketTypePlaceholder: string;
119+
claimedBy: string;
120+
noReasonGiven: string;
121+
unavailable: string;
122+
};
123+
};
124124

125125
export type SponsorType = {
126-
sponsor: {
127-
login: string;
128-
name: string;
129-
avatarUrl: string;
130-
websiteUrl?: string;
131-
linkUrl: string;
132-
type: string;
133-
avatarUrlHighRes: string;
134-
avatarUrlMediumRes: string;
135-
avatarUrlLowRes: string;
136-
},
137-
isOneTime: boolean;
138-
monthlyDollars: number;
139-
privacyLevel: string;
140-
tierName: string;
141-
createdAt: string;
142-
provider: string;
143-
}
126+
sponsor: {
127+
login: string;
128+
name: string;
129+
avatarUrl: string;
130+
websiteUrl?: string;
131+
linkUrl: string;
132+
type: string;
133+
avatarUrlHighRes: string;
134+
avatarUrlMediumRes: string;
135+
avatarUrlLowRes: string;
136+
};
137+
isOneTime: boolean;
138+
monthlyDollars: number;
139+
privacyLevel: string;
140+
tierName: string;
141+
createdAt: string;
142+
provider: string;
143+
};
144144

145145
// Config types and setups
146146
type TicketQuestionType = {
147-
label: string;
148-
placeholder: string;
149-
style: string;
150-
maxLength: number;
151-
}
147+
label: string;
148+
placeholder: string;
149+
style: string;
150+
maxLength: number;
151+
};
152152

153153
export type TicketType = {
154-
codeName: string;
155-
name: string;
156-
description: string;
157-
emoji: string;
158-
color?: ColorResolvable;
159-
categoryId: string;
160-
ticketNameOption: string;
161-
customDescription: string;
162-
cantAccess: string[];
163-
askQuestions: boolean;
164-
questions: TicketQuestionType[];
165-
staffRoles?: string[];
166-
}
154+
codeName: string;
155+
name: string;
156+
description: string;
157+
emoji: string;
158+
color?: ColorResolvable;
159+
categoryId: string;
160+
ticketNameOption: string;
161+
customDescription: string;
162+
cantAccess: string[];
163+
askQuestions: boolean;
164+
questions: TicketQuestionType[];
165+
staffRoles?: string[];
166+
};

0 commit comments

Comments
 (0)