-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslashCommands.js
More file actions
264 lines (260 loc) · 8.19 KB
/
slashCommands.js
File metadata and controls
264 lines (260 loc) · 8.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
const { ApplicationCommandOptionType } = require('discord.js');
async function registerSlashCommands(mimibot) {
try {
// Wait for the application's commands to be loaded
await mimibot.application?.commands.fetch();
const commandData = [
{
name: 'simulcra',
description: 'Pull up a drop-down menu',
},
{
name: 'schedule',
description: 'Schedule raids, oow (origins of war), or void abyss.',
options: [
{
name: 'type',
type: ApplicationCommandOptionType.String,
description: 'The type of event to schedule (raids, oow, or voidabyss).',
required: true,
choices: [
{ name: 'raids', value: 'raids' },
{ name: 'oow', value: 'oow' },
{ name: 'voidabyss', value: 'voidabyss' },
],
},
{
name: 'times',
type: ApplicationCommandOptionType.String,
description: 'Custom times in discord timestamp format <t:xxxxx>, separated by commas.',
required: true,
},
],
},
{
name: 'pullcalc',
description: 'Calculate the probability of getting a certain number of copies in a limited banner.',
options: [
{
name: 'current_counter',
type: ApplicationCommandOptionType.Integer,
description: 'Your current counter out of 80.',
required: true,
},
{
name: 'flame_gold',
type: ApplicationCommandOptionType.Integer,
description: 'Your current amount of flame gold.',
required: true,
},
{
name: 'number_of_copies',
type: ApplicationCommandOptionType.Integer,
description: 'Number of limited banner weapon copies you want.',
required: true,
},
{
name: 'total_pulls',
type: ApplicationCommandOptionType.Integer,
description: 'Total amount of pulls.',
required: true,
},
{
name: 'last_two_outcomes',
type: ApplicationCommandOptionType.Integer,
description: 'Last 2 outcomes (-1 for lost both, 0 for lost last, 0 for won last, 1 for won both).',
required: true,
},
],
},
/*{
name: 'fate',
description: 'Check the fate of another user.',
options: [
{
name: 'user',
type: ApplicationCommandOptionType.User,
description: 'The user whose fate you want to check.',
required: true,
},
],
}, */
{
name: 'dps',
description: 'Calculate DPS for characters with matrices and a trait.',
options: [
{
name: 'character1',
type: ApplicationCommandOptionType.String,
description: 'The first character.',
required: true,
},
{
name: 'character2',
type: ApplicationCommandOptionType.String,
description: 'The second character.',
required: true,
},
{
name: 'character3',
type: ApplicationCommandOptionType.String,
description: 'The third character.',
required: true,
},
{
name: 'matrices1',
type: ApplicationCommandOptionType.String,
description: 'Matrices for the first character (comma-separated).',
required: true,
},
{
name: 'matrices2',
type: ApplicationCommandOptionType.String,
description: 'Matrices for the second character (comma-separated).',
required: true,
},
{
name: 'matrices3',
type: ApplicationCommandOptionType.String,
description: 'Matrices for the third character (comma-separated).',
required: true,
},
{
name: 'trait',
type: ApplicationCommandOptionType.String,
description: 'The trait used by the characters.',
required: true,
},
{
name: 'skill1',
type: ApplicationCommandOptionType.String,
description: 'First fiona skill',
required: false,
},
{
name: 'skill2',
type: ApplicationCommandOptionType.String,
description: 'Second fiona skill',
required: false,
}
],
},
{
name: 'meta',
description: 'Meta team comps at various investment levels',
options: [
{
name: 'element',
type: ApplicationCommandOptionType.String,
description: 'The type of element',
required: true,
choices: [
{ name: 'Frost', value: 'frost' },
{ name: 'Flame', value: 'flame' },
{ name: 'Volt', value: 'volt' },
{ name: 'Physical', value: 'physical'},
{ name: 'Altered', value: 'altered'}
],
},
{
name: 'investment',
type: ApplicationCommandOptionType.String,
description: 'Level of investment $$',
required: true,
choices: [
{ name: 'Whale', value: 'whale' },
{ name: 'Dolphin', value: 'dolphin' },
{ name: 'F2P+', value: 'f2p+' },
{ name: 'F2P', value: 'f2p' },
],
},
],
},
{
name: 'dpshelp',
description: 'Dps calc helper!',
},
{
name: 'join',
description: 'join embed',
},
{
name: 'blame',
description: 'blame people',
options: [
{
name: 'user',
type: ApplicationCommandOptionType.String,
description: 'usually eresh',
required: true,
},
]
},
{
name: 'assigntofrole',
description: '[ADMIN ONLY] Assign the Tower of Fantasy role to all server members',
},
{
name: 'bpapply',
description: 'Post the Blue Protocol guild application form in the current channel',
},
{
name: 'raid',
description: 'Organize a 20-man raid with role selection and availability signup',
options: [
{
name: 'times',
type: ApplicationCommandOptionType.String,
description: 'Comma-separated Discord time codes (e.g., <t:1762328496:F>, <t:1762328497:F>)',
required: true,
},
{
name: 'type',
type: ApplicationCommandOptionType.String,
description: 'Type of raid difficulty',
required: true,
choices: [
{ name: 'Normal', value: 'normal' },
{ name: 'Hard', value: 'hard' },
{ name: 'Both', value: 'both' },
],
},
{
name: 'raid',
type: ApplicationCommandOptionType.String,
description: 'Which raid boss(es)',
required: true,
choices: [
{ name: 'Bone Dragon', value: 'bone dragon' },
{ name: 'Ice Dragon', value: 'ice dragon' },
{ name: 'Both', value: 'both' },
],
},
{
name: 'minimum_ability_score',
type: ApplicationCommandOptionType.String,
description: 'Minimum ability scores per raid (e.g., 15500(ice), 17000(bone))',
required: true,
},
],
},
{
name: 'raidreset',
description: '[ADMIN ONLY] Reset all raid signups and voting data',
},
{
name: 'raidstatus',
description: '[ADMIN ONLY] View current raid data status and persistence info',
},
];
for (const command of commandData) {
await mimibot.application?.commands.create(command);
}
console.log('Slash commands registered globally!');
} catch (error) {
console.error('Error registering slash commands:', error);
}
}
module.exports = {
registerSlashCommands,
};