@furlow/builtins 1.0.1 → 1.0.3
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.
- package/dist/afk/index.js +7 -7
- package/dist/afk/index.js.map +1 -1
- package/dist/auto-responder/index.js +17 -17
- package/dist/auto-responder/index.js.map +1 -1
- package/dist/giveaways/index.js +8 -8
- package/dist/giveaways/index.js.map +1 -1
- package/dist/index.js +181 -181
- package/dist/index.js.map +1 -1
- package/dist/leveling/index.js +15 -15
- package/dist/leveling/index.js.map +1 -1
- package/dist/logging/index.js +25 -25
- package/dist/logging/index.js.map +1 -1
- package/dist/music/index.js +10 -10
- package/dist/music/index.js.map +1 -1
- package/dist/polls/index.js +7 -7
- package/dist/polls/index.js.map +1 -1
- package/dist/reaction-roles/index.js +14 -14
- package/dist/reaction-roles/index.js.map +1 -1
- package/dist/reminders/index.js +4 -4
- package/dist/reminders/index.js.map +1 -1
- package/dist/starboard/index.js +16 -16
- package/dist/starboard/index.js.map +1 -1
- package/dist/tickets/index.js +18 -18
- package/dist/tickets/index.js.map +1 -1
- package/dist/utilities/index.js +23 -23
- package/dist/utilities/index.js.map +1 -1
- package/dist/welcome/index.js +17 -17
- package/dist/welcome/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -222,7 +222,7 @@ var welcomeEventHandlers = [
|
|
|
222
222
|
// Auto-role assignment
|
|
223
223
|
{
|
|
224
224
|
action: "flow_if",
|
|
225
|
-
condition: "
|
|
225
|
+
condition: "config.welcome.autoRoles && config.welcome.autoRoles.length > 0",
|
|
226
226
|
then: [
|
|
227
227
|
{
|
|
228
228
|
action: "assign_role",
|
|
@@ -234,7 +234,7 @@ var welcomeEventHandlers = [
|
|
|
234
234
|
// DM new member
|
|
235
235
|
{
|
|
236
236
|
action: "flow_if",
|
|
237
|
-
condition: "
|
|
237
|
+
condition: "config.welcome.dmNewMembers",
|
|
238
238
|
then: [
|
|
239
239
|
{
|
|
240
240
|
action: "send_dm",
|
|
@@ -246,7 +246,7 @@ var welcomeEventHandlers = [
|
|
|
246
246
|
// Welcome message with image
|
|
247
247
|
{
|
|
248
248
|
action: "flow_if",
|
|
249
|
-
condition: "
|
|
249
|
+
condition: "config.welcome.useImage",
|
|
250
250
|
then: [
|
|
251
251
|
{
|
|
252
252
|
action: "canvas_render",
|
|
@@ -254,14 +254,14 @@ var welcomeEventHandlers = [
|
|
|
254
254
|
context: {
|
|
255
255
|
member: "${member}",
|
|
256
256
|
guild: "${guild}",
|
|
257
|
-
memberCount: "${guild.
|
|
257
|
+
memberCount: "${guild.member_count}"
|
|
258
258
|
},
|
|
259
259
|
as: "welcomeImage"
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
action: "send_message",
|
|
263
263
|
channel: "${config.welcome.channel}",
|
|
264
|
-
content: '${config.welcome.message || "Welcome to the server, " + member.
|
|
264
|
+
content: '${config.welcome.message || "Welcome to the server, " + member.display_name + "!"}',
|
|
265
265
|
files: [
|
|
266
266
|
{
|
|
267
267
|
attachment: "${welcomeImage}",
|
|
@@ -274,7 +274,7 @@ var welcomeEventHandlers = [
|
|
|
274
274
|
// Welcome message without image
|
|
275
275
|
{
|
|
276
276
|
action: "flow_if",
|
|
277
|
-
condition: "
|
|
277
|
+
condition: "config.welcome.embed",
|
|
278
278
|
then: [
|
|
279
279
|
{
|
|
280
280
|
action: "send_message",
|
|
@@ -282,11 +282,11 @@ var welcomeEventHandlers = [
|
|
|
282
282
|
content: "${config.welcome.message}",
|
|
283
283
|
embed: {
|
|
284
284
|
title: '${config.welcome.embed.title || "Welcome!"}',
|
|
285
|
-
description: '${config.welcome.embed.description || "Welcome to " + guild.name + ", " + member.
|
|
285
|
+
description: '${config.welcome.embed.description || "Welcome to " + guild.name + ", " + member.display_name + "!"}',
|
|
286
286
|
color: '${config.welcome.embed.color || "#5865f2"}',
|
|
287
|
-
thumbnail: "${config.welcome.embed.thumbnail || member.
|
|
287
|
+
thumbnail: "${config.welcome.embed.thumbnail || member.avatar}",
|
|
288
288
|
footer: {
|
|
289
|
-
text: '${config.welcome.embed.footer || "Member #" + guild.
|
|
289
|
+
text: '${config.welcome.embed.footer || "Member #" + guild.member_count}'
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
}
|
|
@@ -295,7 +295,7 @@ var welcomeEventHandlers = [
|
|
|
295
295
|
{
|
|
296
296
|
action: "send_message",
|
|
297
297
|
channel: "${config.welcome.channel}",
|
|
298
|
-
content: '${config.welcome.message || "Welcome to the server, " + member.
|
|
298
|
+
content: '${config.welcome.message || "Welcome to the server, " + member.display_name + "!"}'
|
|
299
299
|
}
|
|
300
300
|
]
|
|
301
301
|
}
|
|
@@ -308,18 +308,18 @@ var welcomeEventHandlers = [
|
|
|
308
308
|
actions: [
|
|
309
309
|
{
|
|
310
310
|
action: "flow_if",
|
|
311
|
-
condition: "
|
|
311
|
+
condition: "config.welcome.leaveChannel || config.welcome.channel",
|
|
312
312
|
then: [
|
|
313
313
|
{
|
|
314
314
|
action: "flow_if",
|
|
315
|
-
condition: "
|
|
315
|
+
condition: "config.welcome.leaveEmbed",
|
|
316
316
|
then: [
|
|
317
317
|
{
|
|
318
318
|
action: "send_message",
|
|
319
319
|
channel: "${config.welcome.leaveChannel || config.welcome.channel}",
|
|
320
320
|
embed: {
|
|
321
321
|
title: '${config.welcome.leaveEmbed.title || "Goodbye!"}',
|
|
322
|
-
description: '${config.welcome.leaveEmbed.description || member.
|
|
322
|
+
description: '${config.welcome.leaveEmbed.description || member.display_name + " has left the server."}',
|
|
323
323
|
color: '${config.welcome.leaveEmbed.color || "#ed4245"}'
|
|
324
324
|
}
|
|
325
325
|
}
|
|
@@ -328,7 +328,7 @@ var welcomeEventHandlers = [
|
|
|
328
328
|
{
|
|
329
329
|
action: "send_message",
|
|
330
330
|
channel: "${config.welcome.leaveChannel || config.welcome.channel}",
|
|
331
|
-
content: '${config.welcome.leaveMessage || member.
|
|
331
|
+
content: '${config.welcome.leaveMessage || member.display_name + " has left the server."}'
|
|
332
332
|
}
|
|
333
333
|
]
|
|
334
334
|
}
|
|
@@ -461,7 +461,7 @@ var welcomeCanvasGenerators = {
|
|
|
461
461
|
},
|
|
462
462
|
{
|
|
463
463
|
type: "circle_image",
|
|
464
|
-
url: "${member.
|
|
464
|
+
url: "${member.avatar}",
|
|
465
465
|
x: 400,
|
|
466
466
|
y: 100,
|
|
467
467
|
radius: 64,
|
|
@@ -481,7 +481,7 @@ var welcomeCanvasGenerators = {
|
|
|
481
481
|
},
|
|
482
482
|
{
|
|
483
483
|
type: "text",
|
|
484
|
-
text: "${member.
|
|
484
|
+
text: "${member.display_name}",
|
|
485
485
|
x: 400,
|
|
486
486
|
y: 240,
|
|
487
487
|
font: 'bold 28px "Poppins", sans-serif',
|
|
@@ -490,7 +490,7 @@ var welcomeCanvasGenerators = {
|
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
type: "text",
|
|
493
|
-
text: "Member #${guild.
|
|
493
|
+
text: "Member #${guild.member_count}",
|
|
494
494
|
x: 400,
|
|
495
495
|
y: 275,
|
|
496
496
|
font: '16px "Poppins", sans-serif',
|
|
@@ -515,7 +515,7 @@ var loggingEventHandlers = [
|
|
|
515
515
|
// Message Delete
|
|
516
516
|
{
|
|
517
517
|
event: "message_delete",
|
|
518
|
-
condition: "
|
|
518
|
+
condition: "config.logging.events?.messageDelete !== false && !config.logging.ignoredChannels?.includes(channel.id)",
|
|
519
519
|
actions: [
|
|
520
520
|
{
|
|
521
521
|
action: "send_message",
|
|
@@ -540,7 +540,7 @@ var loggingEventHandlers = [
|
|
|
540
540
|
// Message Edit
|
|
541
541
|
{
|
|
542
542
|
event: "message_update",
|
|
543
|
-
condition: "
|
|
543
|
+
condition: "config.logging.events?.messageEdit !== false && oldMessage.content !== newMessage.content && !config.logging.ignoredChannels?.includes(channel.id)",
|
|
544
544
|
actions: [
|
|
545
545
|
{
|
|
546
546
|
action: "send_message",
|
|
@@ -566,7 +566,7 @@ var loggingEventHandlers = [
|
|
|
566
566
|
// Bulk Message Delete
|
|
567
567
|
{
|
|
568
568
|
event: "message_bulk_delete",
|
|
569
|
-
condition: "
|
|
569
|
+
condition: "config.logging.events?.messageBulkDelete !== false",
|
|
570
570
|
actions: [
|
|
571
571
|
{
|
|
572
572
|
action: "set",
|
|
@@ -594,12 +594,12 @@ var loggingEventHandlers = [
|
|
|
594
594
|
// Member Join
|
|
595
595
|
{
|
|
596
596
|
event: "member_join",
|
|
597
|
-
condition: "
|
|
597
|
+
condition: "config.logging.events?.memberJoin !== false",
|
|
598
598
|
actions: [
|
|
599
599
|
{
|
|
600
600
|
action: "set",
|
|
601
601
|
key: "accountAge",
|
|
602
|
-
value: "${floor((now() - member.
|
|
602
|
+
value: "${floor((now() - member.joined_at) / (1000 * 60 * 60 * 24))}"
|
|
603
603
|
},
|
|
604
604
|
{
|
|
605
605
|
action: "send_message",
|
|
@@ -608,11 +608,11 @@ var loggingEventHandlers = [
|
|
|
608
608
|
title: "Member Joined",
|
|
609
609
|
description: "<@${member.id}> joined the server",
|
|
610
610
|
color: "#57f287",
|
|
611
|
-
thumbnail: "${member.
|
|
611
|
+
thumbnail: "${member.avatar}",
|
|
612
612
|
fields: [
|
|
613
613
|
{ name: "Username", value: "${member.user.tag}", inline: true },
|
|
614
614
|
{ name: "Account Age", value: "${accountAge} days", inline: true },
|
|
615
|
-
{ name: "Member Count", value: "${guild.
|
|
615
|
+
{ name: "Member Count", value: "${guild.member_count}", inline: true }
|
|
616
616
|
],
|
|
617
617
|
footer: {
|
|
618
618
|
text: "User ID: ${member.id}"
|
|
@@ -625,7 +625,7 @@ var loggingEventHandlers = [
|
|
|
625
625
|
// Member Leave
|
|
626
626
|
{
|
|
627
627
|
event: "member_leave",
|
|
628
|
-
condition: "
|
|
628
|
+
condition: "config.logging.events?.memberLeave !== false",
|
|
629
629
|
actions: [
|
|
630
630
|
{
|
|
631
631
|
action: "set",
|
|
@@ -639,11 +639,11 @@ var loggingEventHandlers = [
|
|
|
639
639
|
title: "Member Left",
|
|
640
640
|
description: "<@${member.id}> left the server",
|
|
641
641
|
color: "#ed4245",
|
|
642
|
-
thumbnail: "${member.
|
|
642
|
+
thumbnail: "${member.avatar}",
|
|
643
643
|
fields: [
|
|
644
644
|
{ name: "Username", value: "${member.user.tag}", inline: true },
|
|
645
645
|
{ name: "Roles", value: "${truncate(roles, 1024)}", inline: false },
|
|
646
|
-
{ name: "Joined At", value: '${timestamp(member.
|
|
646
|
+
{ name: "Joined At", value: '${timestamp(member.joined_at, "R")}', inline: true }
|
|
647
647
|
],
|
|
648
648
|
footer: {
|
|
649
649
|
text: "User ID: ${member.id}"
|
|
@@ -656,12 +656,12 @@ var loggingEventHandlers = [
|
|
|
656
656
|
// Member Update (roles, nickname)
|
|
657
657
|
{
|
|
658
658
|
event: "member_update",
|
|
659
|
-
condition: "
|
|
659
|
+
condition: "config.logging.events?.memberUpdate !== false",
|
|
660
660
|
actions: [
|
|
661
661
|
// Role changes
|
|
662
662
|
{
|
|
663
663
|
action: "flow_if",
|
|
664
|
-
condition: "
|
|
664
|
+
condition: "oldMember.roles.cache.size !== newMember.roles.cache.size",
|
|
665
665
|
then: [
|
|
666
666
|
{
|
|
667
667
|
action: "set",
|
|
@@ -695,7 +695,7 @@ var loggingEventHandlers = [
|
|
|
695
695
|
// Nickname changes
|
|
696
696
|
{
|
|
697
697
|
action: "flow_if",
|
|
698
|
-
condition: "
|
|
698
|
+
condition: "oldMember.nickname !== newMember.nickname",
|
|
699
699
|
then: [
|
|
700
700
|
{
|
|
701
701
|
action: "send_message",
|
|
@@ -721,7 +721,7 @@ var loggingEventHandlers = [
|
|
|
721
721
|
// Member Ban
|
|
722
722
|
{
|
|
723
723
|
event: "member_ban",
|
|
724
|
-
condition: "
|
|
724
|
+
condition: "config.logging.events?.memberBan !== false",
|
|
725
725
|
actions: [
|
|
726
726
|
{
|
|
727
727
|
action: "send_message",
|
|
@@ -730,7 +730,7 @@ var loggingEventHandlers = [
|
|
|
730
730
|
title: "Member Banned",
|
|
731
731
|
description: "<@${user.id}> was banned",
|
|
732
732
|
color: "#ed4245",
|
|
733
|
-
thumbnail: "${user.
|
|
733
|
+
thumbnail: "${user.avatar}",
|
|
734
734
|
fields: [
|
|
735
735
|
{ name: "Username", value: "${user.tag}", inline: true },
|
|
736
736
|
{ name: "Reason", value: '${ban.reason || "No reason provided"}', inline: false }
|
|
@@ -746,7 +746,7 @@ var loggingEventHandlers = [
|
|
|
746
746
|
// Member Unban
|
|
747
747
|
{
|
|
748
748
|
event: "member_unban",
|
|
749
|
-
condition: "
|
|
749
|
+
condition: "config.logging.events?.memberUnban !== false",
|
|
750
750
|
actions: [
|
|
751
751
|
{
|
|
752
752
|
action: "send_message",
|
|
@@ -755,7 +755,7 @@ var loggingEventHandlers = [
|
|
|
755
755
|
title: "Member Unbanned",
|
|
756
756
|
description: "<@${user.id}> was unbanned",
|
|
757
757
|
color: "#57f287",
|
|
758
|
-
thumbnail: "${user.
|
|
758
|
+
thumbnail: "${user.avatar}",
|
|
759
759
|
fields: [
|
|
760
760
|
{ name: "Username", value: "${user.tag}", inline: true }
|
|
761
761
|
],
|
|
@@ -770,7 +770,7 @@ var loggingEventHandlers = [
|
|
|
770
770
|
// Voice Join
|
|
771
771
|
{
|
|
772
772
|
event: "voice_join",
|
|
773
|
-
condition: "
|
|
773
|
+
condition: "config.logging.events?.voiceJoin !== false",
|
|
774
774
|
actions: [
|
|
775
775
|
{
|
|
776
776
|
action: "send_message",
|
|
@@ -790,7 +790,7 @@ var loggingEventHandlers = [
|
|
|
790
790
|
// Voice Leave
|
|
791
791
|
{
|
|
792
792
|
event: "voice_leave",
|
|
793
|
-
condition: "
|
|
793
|
+
condition: "config.logging.events?.voiceLeave !== false",
|
|
794
794
|
actions: [
|
|
795
795
|
{
|
|
796
796
|
action: "send_message",
|
|
@@ -810,7 +810,7 @@ var loggingEventHandlers = [
|
|
|
810
810
|
// Voice Move
|
|
811
811
|
{
|
|
812
812
|
event: "voice_move",
|
|
813
|
-
condition: "
|
|
813
|
+
condition: "config.logging.events?.voiceMove !== false",
|
|
814
814
|
actions: [
|
|
815
815
|
{
|
|
816
816
|
action: "send_message",
|
|
@@ -834,7 +834,7 @@ var loggingEventHandlers = [
|
|
|
834
834
|
// Channel Create
|
|
835
835
|
{
|
|
836
836
|
event: "channel_create",
|
|
837
|
-
condition: "
|
|
837
|
+
condition: "config.logging.events?.channelCreate !== false",
|
|
838
838
|
actions: [
|
|
839
839
|
{
|
|
840
840
|
action: "send_message",
|
|
@@ -855,7 +855,7 @@ var loggingEventHandlers = [
|
|
|
855
855
|
// Channel Delete
|
|
856
856
|
{
|
|
857
857
|
event: "channel_delete",
|
|
858
|
-
condition: "
|
|
858
|
+
condition: "config.logging.events?.channelDelete !== false",
|
|
859
859
|
actions: [
|
|
860
860
|
{
|
|
861
861
|
action: "send_message",
|
|
@@ -875,7 +875,7 @@ var loggingEventHandlers = [
|
|
|
875
875
|
// Role Create
|
|
876
876
|
{
|
|
877
877
|
event: "role_create",
|
|
878
|
-
condition: "
|
|
878
|
+
condition: "config.logging.events?.roleCreate !== false",
|
|
879
879
|
actions: [
|
|
880
880
|
{
|
|
881
881
|
action: "send_message",
|
|
@@ -900,7 +900,7 @@ var loggingEventHandlers = [
|
|
|
900
900
|
// Role Delete
|
|
901
901
|
{
|
|
902
902
|
event: "role_delete",
|
|
903
|
-
condition: "
|
|
903
|
+
condition: "config.logging.events?.roleDelete !== false",
|
|
904
904
|
actions: [
|
|
905
905
|
{
|
|
906
906
|
action: "send_message",
|
|
@@ -940,7 +940,7 @@ var loggingCommands = [
|
|
|
940
940
|
actions: [
|
|
941
941
|
{
|
|
942
942
|
action: "flow_if",
|
|
943
|
-
condition: '
|
|
943
|
+
condition: '!args.category || args.category === "all"',
|
|
944
944
|
then: [
|
|
945
945
|
{
|
|
946
946
|
action: "set",
|
|
@@ -1097,7 +1097,7 @@ var ticketsEventHandlers = [
|
|
|
1097
1097
|
// Handle ticket creation button
|
|
1098
1098
|
{
|
|
1099
1099
|
event: "button_click",
|
|
1100
|
-
condition: '
|
|
1100
|
+
condition: 'interaction.customId === "ticket_create"',
|
|
1101
1101
|
actions: [
|
|
1102
1102
|
// Check max tickets
|
|
1103
1103
|
{
|
|
@@ -1112,7 +1112,7 @@ var ticketsEventHandlers = [
|
|
|
1112
1112
|
},
|
|
1113
1113
|
{
|
|
1114
1114
|
action: "flow_if",
|
|
1115
|
-
condition: "
|
|
1115
|
+
condition: "userTickets.length >= (config.tickets.maxTicketsPerUser || 1)",
|
|
1116
1116
|
then: [
|
|
1117
1117
|
{
|
|
1118
1118
|
action: "reply",
|
|
@@ -1125,7 +1125,7 @@ var ticketsEventHandlers = [
|
|
|
1125
1125
|
// Show category selector if configured
|
|
1126
1126
|
{
|
|
1127
1127
|
action: "flow_if",
|
|
1128
|
-
condition: "
|
|
1128
|
+
condition: "config.tickets.categories && config.tickets.categories.length > 0",
|
|
1129
1129
|
then: [
|
|
1130
1130
|
{
|
|
1131
1131
|
action: "reply",
|
|
@@ -1155,7 +1155,7 @@ var ticketsEventHandlers = [
|
|
|
1155
1155
|
// Handle category selection
|
|
1156
1156
|
{
|
|
1157
1157
|
event: "select_menu",
|
|
1158
|
-
condition: '
|
|
1158
|
+
condition: 'interaction.customId === "ticket_category_select"',
|
|
1159
1159
|
actions: [
|
|
1160
1160
|
{
|
|
1161
1161
|
action: "emit",
|
|
@@ -1259,7 +1259,7 @@ var ticketsEventHandlers = [
|
|
|
1259
1259
|
// Handle claim button
|
|
1260
1260
|
{
|
|
1261
1261
|
event: "button_click",
|
|
1262
|
-
condition: '
|
|
1262
|
+
condition: 'interaction.customId === "ticket_claim"',
|
|
1263
1263
|
actions: [
|
|
1264
1264
|
{
|
|
1265
1265
|
action: "db_query",
|
|
@@ -1269,7 +1269,7 @@ var ticketsEventHandlers = [
|
|
|
1269
1269
|
},
|
|
1270
1270
|
{
|
|
1271
1271
|
action: "flow_if",
|
|
1272
|
-
condition: "
|
|
1272
|
+
condition: "!ticket[0]",
|
|
1273
1273
|
then: [
|
|
1274
1274
|
{ action: "reply", content: "This is not a ticket channel!", ephemeral: true },
|
|
1275
1275
|
{ action: "abort" }
|
|
@@ -1277,7 +1277,7 @@ var ticketsEventHandlers = [
|
|
|
1277
1277
|
},
|
|
1278
1278
|
{
|
|
1279
1279
|
action: "flow_if",
|
|
1280
|
-
condition: "
|
|
1280
|
+
condition: "ticket[0].claimed_by",
|
|
1281
1281
|
then: [
|
|
1282
1282
|
{ action: "reply", content: "This ticket is already claimed by <@${ticket[0].claimed_by}>!", ephemeral: true },
|
|
1283
1283
|
{ action: "abort" }
|
|
@@ -1303,7 +1303,7 @@ var ticketsEventHandlers = [
|
|
|
1303
1303
|
// Handle close button
|
|
1304
1304
|
{
|
|
1305
1305
|
event: "button_click",
|
|
1306
|
-
condition: '
|
|
1306
|
+
condition: 'interaction.customId === "ticket_close"',
|
|
1307
1307
|
actions: [
|
|
1308
1308
|
{
|
|
1309
1309
|
action: "db_query",
|
|
@@ -1313,7 +1313,7 @@ var ticketsEventHandlers = [
|
|
|
1313
1313
|
},
|
|
1314
1314
|
{
|
|
1315
1315
|
action: "flow_if",
|
|
1316
|
-
condition: "
|
|
1316
|
+
condition: "!ticket[0]",
|
|
1317
1317
|
then: [
|
|
1318
1318
|
{ action: "reply", content: "This is not a ticket channel!", ephemeral: true },
|
|
1319
1319
|
{ action: "abort" }
|
|
@@ -1339,7 +1339,7 @@ var ticketsEventHandlers = [
|
|
|
1339
1339
|
// Handle close confirmation
|
|
1340
1340
|
{
|
|
1341
1341
|
event: "button_click",
|
|
1342
|
-
condition: '
|
|
1342
|
+
condition: 'interaction.customId === "ticket_close_confirm"',
|
|
1343
1343
|
actions: [
|
|
1344
1344
|
{
|
|
1345
1345
|
action: "db_query",
|
|
@@ -1350,7 +1350,7 @@ var ticketsEventHandlers = [
|
|
|
1350
1350
|
// Generate transcript if configured
|
|
1351
1351
|
{
|
|
1352
1352
|
action: "flow_if",
|
|
1353
|
-
condition: "
|
|
1353
|
+
condition: "config.tickets.includeTranscript && config.tickets.logChannel",
|
|
1354
1354
|
then: [
|
|
1355
1355
|
{
|
|
1356
1356
|
action: "db_query",
|
|
@@ -1397,7 +1397,7 @@ var ticketsEventHandlers = [
|
|
|
1397
1397
|
// DM user if configured
|
|
1398
1398
|
{
|
|
1399
1399
|
action: "flow_if",
|
|
1400
|
-
condition: "
|
|
1400
|
+
condition: "config.tickets.dmOnClose",
|
|
1401
1401
|
then: [
|
|
1402
1402
|
{
|
|
1403
1403
|
action: "send_dm",
|
|
@@ -1423,7 +1423,7 @@ var ticketsEventHandlers = [
|
|
|
1423
1423
|
// Handle transcript button
|
|
1424
1424
|
{
|
|
1425
1425
|
event: "button_click",
|
|
1426
|
-
condition: '
|
|
1426
|
+
condition: 'interaction.customId === "ticket_transcript"',
|
|
1427
1427
|
actions: [
|
|
1428
1428
|
{
|
|
1429
1429
|
action: "db_query",
|
|
@@ -1459,7 +1459,7 @@ var ticketsEventHandlers = [
|
|
|
1459
1459
|
// Log ticket messages
|
|
1460
1460
|
{
|
|
1461
1461
|
event: "message",
|
|
1462
|
-
condition: "
|
|
1462
|
+
condition: "channel.parentId === config.tickets.category",
|
|
1463
1463
|
actions: [
|
|
1464
1464
|
{
|
|
1465
1465
|
action: "db_query",
|
|
@@ -1469,7 +1469,7 @@ var ticketsEventHandlers = [
|
|
|
1469
1469
|
},
|
|
1470
1470
|
{
|
|
1471
1471
|
action: "flow_if",
|
|
1472
|
-
condition: "
|
|
1472
|
+
condition: "ticket[0]",
|
|
1473
1473
|
then: [
|
|
1474
1474
|
{
|
|
1475
1475
|
action: "db_insert",
|
|
@@ -1533,7 +1533,7 @@ var ticketsCommands = [
|
|
|
1533
1533
|
},
|
|
1534
1534
|
{
|
|
1535
1535
|
action: "flow_if",
|
|
1536
|
-
condition: "
|
|
1536
|
+
condition: "!ticket[0]",
|
|
1537
1537
|
then: [
|
|
1538
1538
|
{ action: "reply", content: "This is not a ticket channel!", ephemeral: true },
|
|
1539
1539
|
{ action: "abort" }
|
|
@@ -1568,7 +1568,7 @@ var ticketsCommands = [
|
|
|
1568
1568
|
},
|
|
1569
1569
|
{
|
|
1570
1570
|
action: "flow_if",
|
|
1571
|
-
condition: "
|
|
1571
|
+
condition: "!ticket[0]",
|
|
1572
1572
|
then: [
|
|
1573
1573
|
{ action: "reply", content: "This is not a ticket channel!", ephemeral: true },
|
|
1574
1574
|
{ action: "abort" }
|
|
@@ -1603,7 +1603,7 @@ var ticketsCommands = [
|
|
|
1603
1603
|
},
|
|
1604
1604
|
{
|
|
1605
1605
|
action: "flow_if",
|
|
1606
|
-
condition: "
|
|
1606
|
+
condition: "!ticket[0]",
|
|
1607
1607
|
then: [
|
|
1608
1608
|
{ action: "reply", content: "This is not a ticket channel!", ephemeral: true },
|
|
1609
1609
|
{ action: "abort" }
|
|
@@ -1663,7 +1663,7 @@ var reactionRolesEventHandlers = [
|
|
|
1663
1663
|
// Handle button clicks
|
|
1664
1664
|
{
|
|
1665
1665
|
event: "button_click",
|
|
1666
|
-
condition: '
|
|
1666
|
+
condition: 'interaction.customId.startsWith("rr_")',
|
|
1667
1667
|
actions: [
|
|
1668
1668
|
{
|
|
1669
1669
|
action: "set",
|
|
@@ -1678,7 +1678,7 @@ var reactionRolesEventHandlers = [
|
|
|
1678
1678
|
},
|
|
1679
1679
|
{
|
|
1680
1680
|
action: "flow_if",
|
|
1681
|
-
condition: "
|
|
1681
|
+
condition: "!panel[0]",
|
|
1682
1682
|
then: [
|
|
1683
1683
|
{ action: "reply", content: "This role panel is no longer valid.", ephemeral: true },
|
|
1684
1684
|
{ action: "abort" }
|
|
@@ -1697,7 +1697,7 @@ var reactionRolesEventHandlers = [
|
|
|
1697
1697
|
toggle: [
|
|
1698
1698
|
{
|
|
1699
1699
|
action: "flow_if",
|
|
1700
|
-
condition: "
|
|
1700
|
+
condition: "hasRole",
|
|
1701
1701
|
then: [
|
|
1702
1702
|
{ action: "remove_role", user: "${member.id}", role: "${roleId}" },
|
|
1703
1703
|
{ action: "reply", content: "Removed <@&${roleId}>", ephemeral: true }
|
|
@@ -1711,7 +1711,7 @@ var reactionRolesEventHandlers = [
|
|
|
1711
1711
|
give: [
|
|
1712
1712
|
{
|
|
1713
1713
|
action: "flow_if",
|
|
1714
|
-
condition: "
|
|
1714
|
+
condition: "hasRole",
|
|
1715
1715
|
then: [
|
|
1716
1716
|
{ action: "reply", content: "You already have <@&${roleId}>", ephemeral: true }
|
|
1717
1717
|
],
|
|
@@ -1724,7 +1724,7 @@ var reactionRolesEventHandlers = [
|
|
|
1724
1724
|
take: [
|
|
1725
1725
|
{
|
|
1726
1726
|
action: "flow_if",
|
|
1727
|
-
condition: "
|
|
1727
|
+
condition: "!hasRole",
|
|
1728
1728
|
then: [
|
|
1729
1729
|
{ action: "reply", content: "You don't have <@&${roleId}>", ephemeral: true }
|
|
1730
1730
|
],
|
|
@@ -1755,7 +1755,7 @@ var reactionRolesEventHandlers = [
|
|
|
1755
1755
|
// Log if configured
|
|
1756
1756
|
{
|
|
1757
1757
|
action: "flow_if",
|
|
1758
|
-
condition: "
|
|
1758
|
+
condition: "config.reactionRoles?.logChannel",
|
|
1759
1759
|
then: [
|
|
1760
1760
|
{
|
|
1761
1761
|
action: "send_message",
|
|
@@ -1773,7 +1773,7 @@ var reactionRolesEventHandlers = [
|
|
|
1773
1773
|
// Handle select menu
|
|
1774
1774
|
{
|
|
1775
1775
|
event: "select_menu",
|
|
1776
|
-
condition: '
|
|
1776
|
+
condition: 'interaction.customId.startsWith("rr_select_")',
|
|
1777
1777
|
actions: [
|
|
1778
1778
|
{
|
|
1779
1779
|
action: "set",
|
|
@@ -1829,7 +1829,7 @@ var reactionRolesEventHandlers = [
|
|
|
1829
1829
|
},
|
|
1830
1830
|
{
|
|
1831
1831
|
action: "flow_if",
|
|
1832
|
-
condition: "
|
|
1832
|
+
condition: "panel[0]",
|
|
1833
1833
|
then: [
|
|
1834
1834
|
{
|
|
1835
1835
|
action: "db_query",
|
|
@@ -1839,7 +1839,7 @@ var reactionRolesEventHandlers = [
|
|
|
1839
1839
|
},
|
|
1840
1840
|
{
|
|
1841
1841
|
action: "flow_if",
|
|
1842
|
-
condition: "
|
|
1842
|
+
condition: "entry[0]",
|
|
1843
1843
|
then: [
|
|
1844
1844
|
{ action: "assign_role", user: "${user.id}", role: "${entry[0].role_id}" }
|
|
1845
1845
|
]
|
|
@@ -1860,7 +1860,7 @@ var reactionRolesEventHandlers = [
|
|
|
1860
1860
|
},
|
|
1861
1861
|
{
|
|
1862
1862
|
action: "flow_if",
|
|
1863
|
-
condition: '
|
|
1863
|
+
condition: 'panel[0] && panel[0].mode !== "give"',
|
|
1864
1864
|
then: [
|
|
1865
1865
|
{
|
|
1866
1866
|
action: "db_query",
|
|
@@ -1870,7 +1870,7 @@ var reactionRolesEventHandlers = [
|
|
|
1870
1870
|
},
|
|
1871
1871
|
{
|
|
1872
1872
|
action: "flow_if",
|
|
1873
|
-
condition: "
|
|
1873
|
+
condition: "entry[0]",
|
|
1874
1874
|
then: [
|
|
1875
1875
|
{ action: "remove_role", user: "${user.id}", role: "${entry[0].role_id}" }
|
|
1876
1876
|
]
|
|
@@ -1953,7 +1953,7 @@ var reactionRolesCommands = [
|
|
|
1953
1953
|
},
|
|
1954
1954
|
{
|
|
1955
1955
|
action: "flow_if",
|
|
1956
|
-
condition: "
|
|
1956
|
+
condition: "!panel[0]",
|
|
1957
1957
|
then: [
|
|
1958
1958
|
{ action: "reply", content: "Panel not found!", ephemeral: true },
|
|
1959
1959
|
{ action: "abort" }
|
|
@@ -2061,7 +2061,7 @@ var reactionRolesCommands = [
|
|
|
2061
2061
|
},
|
|
2062
2062
|
{
|
|
2063
2063
|
action: "flow_if",
|
|
2064
|
-
condition: "
|
|
2064
|
+
condition: "!panel[0]",
|
|
2065
2065
|
then: [
|
|
2066
2066
|
{ action: "reply", content: "Select menu panel not found!", ephemeral: true },
|
|
2067
2067
|
{ action: "abort" }
|
|
@@ -2134,7 +2134,7 @@ var reactionRolesCommands = [
|
|
|
2134
2134
|
},
|
|
2135
2135
|
{
|
|
2136
2136
|
action: "flow_if",
|
|
2137
|
-
condition: "
|
|
2137
|
+
condition: "!panel[0]",
|
|
2138
2138
|
then: [
|
|
2139
2139
|
{ action: "reply", content: "Panel not found!", ephemeral: true },
|
|
2140
2140
|
{ action: "abort" }
|
|
@@ -2192,7 +2192,7 @@ var levelingTables = {
|
|
|
2192
2192
|
var levelingEventHandlers = [
|
|
2193
2193
|
{
|
|
2194
2194
|
event: "message",
|
|
2195
|
-
condition: "
|
|
2195
|
+
condition: "!message.author.bot && !config.leveling.ignoredChannels?.includes(channel.id)",
|
|
2196
2196
|
actions: [
|
|
2197
2197
|
// Check cooldown
|
|
2198
2198
|
{
|
|
@@ -2207,7 +2207,7 @@ var levelingEventHandlers = [
|
|
|
2207
2207
|
// Initialize if new user
|
|
2208
2208
|
{
|
|
2209
2209
|
action: "flow_if",
|
|
2210
|
-
condition: "
|
|
2210
|
+
condition: "!userData || userData.length === 0",
|
|
2211
2211
|
then: [
|
|
2212
2212
|
{
|
|
2213
2213
|
action: "db_insert",
|
|
@@ -2236,7 +2236,7 @@ var levelingEventHandlers = [
|
|
|
2236
2236
|
},
|
|
2237
2237
|
{
|
|
2238
2238
|
action: "flow_if",
|
|
2239
|
-
condition: "
|
|
2239
|
+
condition: "cooldownPassed",
|
|
2240
2240
|
then: [
|
|
2241
2241
|
// Calculate XP gain
|
|
2242
2242
|
{
|
|
@@ -2306,25 +2306,25 @@ var levelingEventHandlers = [
|
|
|
2306
2306
|
// Handle level up
|
|
2307
2307
|
{
|
|
2308
2308
|
action: "flow_if",
|
|
2309
|
-
condition: "
|
|
2309
|
+
condition: "leveledUp",
|
|
2310
2310
|
then: [
|
|
2311
2311
|
// Announce level up
|
|
2312
2312
|
{
|
|
2313
2313
|
action: "flow_if",
|
|
2314
|
-
condition: "
|
|
2314
|
+
condition: "config.leveling.announceChannel",
|
|
2315
2315
|
then: [
|
|
2316
2316
|
{
|
|
2317
2317
|
action: "flow_if",
|
|
2318
|
-
condition: "
|
|
2318
|
+
condition: "config.leveling.levelUpEmbed",
|
|
2319
2319
|
then: [
|
|
2320
2320
|
{
|
|
2321
2321
|
action: "send_message",
|
|
2322
2322
|
channel: "${config.leveling.announceChannel}",
|
|
2323
2323
|
embed: {
|
|
2324
2324
|
title: "Level Up!",
|
|
2325
|
-
description: '${config.leveling.levelUpMessage || member.
|
|
2325
|
+
description: '${config.leveling.levelUpMessage || member.display_name + " has reached level " + newLevel + "!"}',
|
|
2326
2326
|
color: "#ffd700",
|
|
2327
|
-
thumbnail: "${member.
|
|
2327
|
+
thumbnail: "${member.avatar}"
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
2330
|
],
|
|
@@ -2332,7 +2332,7 @@ var levelingEventHandlers = [
|
|
|
2332
2332
|
{
|
|
2333
2333
|
action: "send_message",
|
|
2334
2334
|
channel: "${config.leveling.announceChannel}",
|
|
2335
|
-
content: '${config.leveling.levelUpMessage || "Congratulations " + member.
|
|
2335
|
+
content: '${config.leveling.levelUpMessage || "Congratulations " + member.display_name + "! You reached level " + newLevel + "!"}'
|
|
2336
2336
|
}
|
|
2337
2337
|
]
|
|
2338
2338
|
}
|
|
@@ -2341,12 +2341,12 @@ var levelingEventHandlers = [
|
|
|
2341
2341
|
// Award role rewards
|
|
2342
2342
|
{
|
|
2343
2343
|
action: "flow_if",
|
|
2344
|
-
condition: "
|
|
2344
|
+
condition: "config.leveling.rewards && config.leveling.rewards[newLevel]",
|
|
2345
2345
|
then: [
|
|
2346
2346
|
// Remove previous rewards if not stacking
|
|
2347
2347
|
{
|
|
2348
2348
|
action: "flow_if",
|
|
2349
|
-
condition: "
|
|
2349
|
+
condition: "!config.leveling.stackRewards && currentLevel > 0 && config.leveling.rewards[currentLevel]",
|
|
2350
2350
|
then: [
|
|
2351
2351
|
{
|
|
2352
2352
|
action: "remove_role",
|
|
@@ -2393,7 +2393,7 @@ var levelingCommands = [
|
|
|
2393
2393
|
},
|
|
2394
2394
|
{
|
|
2395
2395
|
action: "flow_if",
|
|
2396
|
-
condition: "
|
|
2396
|
+
condition: "!userData || userData.length === 0",
|
|
2397
2397
|
then: [
|
|
2398
2398
|
{
|
|
2399
2399
|
action: "reply",
|
|
@@ -2425,7 +2425,7 @@ var levelingCommands = [
|
|
|
2425
2425
|
// Render rank card or embed
|
|
2426
2426
|
{
|
|
2427
2427
|
action: "flow_if",
|
|
2428
|
-
condition: "
|
|
2428
|
+
condition: "config.leveling.useRankCard",
|
|
2429
2429
|
then: [
|
|
2430
2430
|
{
|
|
2431
2431
|
action: "canvas_render",
|
|
@@ -2457,7 +2457,7 @@ var levelingCommands = [
|
|
|
2457
2457
|
embed: {
|
|
2458
2458
|
title: "${targetUser.username}'s Rank",
|
|
2459
2459
|
color: "#5865f2",
|
|
2460
|
-
thumbnail: "${targetUser.
|
|
2460
|
+
thumbnail: "${targetUser.avatar}",
|
|
2461
2461
|
fields: [
|
|
2462
2462
|
{ name: "Rank", value: "#${rank}", inline: true },
|
|
2463
2463
|
{ name: "Level", value: "${userData[0].level}", inline: true },
|
|
@@ -2593,7 +2593,7 @@ var levelingCanvasGenerators = {
|
|
|
2593
2593
|
// User avatar
|
|
2594
2594
|
{
|
|
2595
2595
|
type: "circle_image",
|
|
2596
|
-
url: "${user.
|
|
2596
|
+
url: "${user.avatar}",
|
|
2597
2597
|
x: 120,
|
|
2598
2598
|
y: 141,
|
|
2599
2599
|
radius: 80,
|
|
@@ -2713,7 +2713,7 @@ var musicCommands = [
|
|
|
2713
2713
|
// Check if user is in voice channel
|
|
2714
2714
|
{
|
|
2715
2715
|
action: "flow_if",
|
|
2716
|
-
condition: "
|
|
2716
|
+
condition: "!member.voice.channel",
|
|
2717
2717
|
then: [
|
|
2718
2718
|
{ action: "reply", content: "You must be in a voice channel!", ephemeral: true },
|
|
2719
2719
|
{ action: "abort" }
|
|
@@ -2732,7 +2732,7 @@ var musicCommands = [
|
|
|
2732
2732
|
},
|
|
2733
2733
|
{
|
|
2734
2734
|
action: "flow_if",
|
|
2735
|
-
condition: "
|
|
2735
|
+
condition: "!track",
|
|
2736
2736
|
then: [
|
|
2737
2737
|
{ action: "reply", content: "No results found for: ${args.query}", ephemeral: true },
|
|
2738
2738
|
{ action: "abort" }
|
|
@@ -2831,7 +2831,7 @@ var musicCommands = [
|
|
|
2831
2831
|
},
|
|
2832
2832
|
{
|
|
2833
2833
|
action: "flow_if",
|
|
2834
|
-
condition: "
|
|
2834
|
+
condition: "queue.tracks.length === 0",
|
|
2835
2835
|
then: [
|
|
2836
2836
|
{ action: "reply", content: "The queue is empty!", ephemeral: true },
|
|
2837
2837
|
{ action: "abort" }
|
|
@@ -2880,7 +2880,7 @@ var musicCommands = [
|
|
|
2880
2880
|
},
|
|
2881
2881
|
{
|
|
2882
2882
|
action: "flow_if",
|
|
2883
|
-
condition: "
|
|
2883
|
+
condition: "!queue.current",
|
|
2884
2884
|
then: [
|
|
2885
2885
|
{ action: "reply", content: "Nothing is playing!", ephemeral: true },
|
|
2886
2886
|
{ action: "abort" }
|
|
@@ -2921,7 +2921,7 @@ var musicCommands = [
|
|
|
2921
2921
|
actions: [
|
|
2922
2922
|
{
|
|
2923
2923
|
action: "flow_if",
|
|
2924
|
-
condition: "
|
|
2924
|
+
condition: "args.level < 0 || args.level > 100",
|
|
2925
2925
|
then: [
|
|
2926
2926
|
{ action: "reply", content: "Volume must be between 0 and 100!", ephemeral: true },
|
|
2927
2927
|
{ action: "abort" }
|
|
@@ -2983,7 +2983,7 @@ var musicCommands = [
|
|
|
2983
2983
|
actions: [
|
|
2984
2984
|
{
|
|
2985
2985
|
action: "flow_if",
|
|
2986
|
-
condition: "
|
|
2986
|
+
condition: "!config.music?.allowSeeking",
|
|
2987
2987
|
then: [
|
|
2988
2988
|
{ action: "reply", content: "Seeking is disabled!", ephemeral: true },
|
|
2989
2989
|
{ action: "abort" }
|
|
@@ -3017,7 +3017,7 @@ var musicCommands = [
|
|
|
3017
3017
|
actions: [
|
|
3018
3018
|
{
|
|
3019
3019
|
action: "flow_if",
|
|
3020
|
-
condition: "
|
|
3020
|
+
condition: "!config.music?.allowFilters",
|
|
3021
3021
|
then: [
|
|
3022
3022
|
{ action: "reply", content: "Filters are disabled!", ephemeral: true },
|
|
3023
3023
|
{ action: "abort" }
|
|
@@ -3053,7 +3053,7 @@ var musicEventHandlers = [
|
|
|
3053
3053
|
// Announce now playing
|
|
3054
3054
|
{
|
|
3055
3055
|
event: "voice_track_start",
|
|
3056
|
-
condition: "
|
|
3056
|
+
condition: "config.music?.announceNowPlaying",
|
|
3057
3057
|
actions: [
|
|
3058
3058
|
{
|
|
3059
3059
|
action: "send_message",
|
|
@@ -3074,12 +3074,12 @@ var musicEventHandlers = [
|
|
|
3074
3074
|
// Auto-leave when alone
|
|
3075
3075
|
{
|
|
3076
3076
|
event: "voice_leave",
|
|
3077
|
-
condition: "
|
|
3077
|
+
condition: "voiceChannel.members.filter(m => !m.user.bot).size === 0 && !config.music?.stayInChannel",
|
|
3078
3078
|
actions: [
|
|
3079
3079
|
{ action: "wait", duration: 3e4 },
|
|
3080
3080
|
{
|
|
3081
3081
|
action: "flow_if",
|
|
3082
|
-
condition: "
|
|
3082
|
+
condition: "voiceChannel.members.filter(m => !m.user.bot).size === 0",
|
|
3083
3083
|
then: [
|
|
3084
3084
|
{ action: "voice_leave" }
|
|
3085
3085
|
]
|
|
@@ -3124,30 +3124,30 @@ var starboardEventHandlers = [
|
|
|
3124
3124
|
// Handle star reactions
|
|
3125
3125
|
{
|
|
3126
3126
|
event: "reaction_add",
|
|
3127
|
-
condition: '
|
|
3127
|
+
condition: '(reaction.emoji.name === (config.starboard?.emoji || "\u2B50") || reaction.emoji.name === "\u{1F31F}") && config.starboard?.channel',
|
|
3128
3128
|
actions: [
|
|
3129
3129
|
// Check if channel is ignored
|
|
3130
3130
|
{
|
|
3131
3131
|
action: "flow_if",
|
|
3132
|
-
condition: "
|
|
3132
|
+
condition: "config.starboard.ignoredChannels?.includes(channel.id)",
|
|
3133
3133
|
then: [{ action: "abort" }]
|
|
3134
3134
|
},
|
|
3135
3135
|
// Check NSFW
|
|
3136
3136
|
{
|
|
3137
3137
|
action: "flow_if",
|
|
3138
|
-
condition: "
|
|
3138
|
+
condition: "channel.nsfw && !config.starboard.nsfwAllowed",
|
|
3139
3139
|
then: [{ action: "abort" }]
|
|
3140
3140
|
},
|
|
3141
3141
|
// Check self-star
|
|
3142
3142
|
{
|
|
3143
3143
|
action: "flow_if",
|
|
3144
|
-
condition: "
|
|
3144
|
+
condition: "!config.starboard.selfStar && user.id === message.author.id",
|
|
3145
3145
|
then: [{ action: "abort" }]
|
|
3146
3146
|
},
|
|
3147
3147
|
// Check bot messages
|
|
3148
3148
|
{
|
|
3149
3149
|
action: "flow_if",
|
|
3150
|
-
condition: "
|
|
3150
|
+
condition: "!config.starboard.botMessages && message.author.bot",
|
|
3151
3151
|
then: [{ action: "abort" }]
|
|
3152
3152
|
},
|
|
3153
3153
|
// Check if already starred by this user
|
|
@@ -3159,7 +3159,7 @@ var starboardEventHandlers = [
|
|
|
3159
3159
|
},
|
|
3160
3160
|
{
|
|
3161
3161
|
action: "flow_if",
|
|
3162
|
-
condition: "
|
|
3162
|
+
condition: "existingStar.length > 0",
|
|
3163
3163
|
then: [{ action: "abort" }]
|
|
3164
3164
|
},
|
|
3165
3165
|
// Add star
|
|
@@ -3215,7 +3215,7 @@ var starboardEventHandlers = [
|
|
|
3215
3215
|
},
|
|
3216
3216
|
{
|
|
3217
3217
|
action: "flow_if",
|
|
3218
|
-
condition: "
|
|
3218
|
+
condition: "existing.length > 0",
|
|
3219
3219
|
then: [
|
|
3220
3220
|
// Update existing starboard message
|
|
3221
3221
|
{
|
|
@@ -3235,7 +3235,7 @@ var starboardEventHandlers = [
|
|
|
3235
3235
|
// Create new starboard entry if threshold met
|
|
3236
3236
|
{
|
|
3237
3237
|
action: "flow_if",
|
|
3238
|
-
condition: "
|
|
3238
|
+
condition: "starCount >= threshold",
|
|
3239
3239
|
then: [
|
|
3240
3240
|
// Build embed
|
|
3241
3241
|
{
|
|
@@ -3250,12 +3250,12 @@ var starboardEventHandlers = [
|
|
|
3250
3250
|
embed: {
|
|
3251
3251
|
author: {
|
|
3252
3252
|
name: "${message.author.tag}",
|
|
3253
|
-
icon_url: "${message.author.
|
|
3253
|
+
icon_url: "${message.author.avatar}"
|
|
3254
3254
|
},
|
|
3255
3255
|
description: "${message.content}\n\n[Jump to message](${message.url})",
|
|
3256
3256
|
color: "${embedColor}",
|
|
3257
3257
|
image: "${imageUrl ? { url: imageUrl } : null}",
|
|
3258
|
-
timestamp: "${message.
|
|
3258
|
+
timestamp: "${message.created_at}",
|
|
3259
3259
|
footer: {
|
|
3260
3260
|
text: "ID: ${message.id}"
|
|
3261
3261
|
}
|
|
@@ -3284,7 +3284,7 @@ var starboardEventHandlers = [
|
|
|
3284
3284
|
// Handle star removal
|
|
3285
3285
|
{
|
|
3286
3286
|
event: "reaction_remove",
|
|
3287
|
-
condition: '
|
|
3287
|
+
condition: '(reaction.emoji.name === (config.starboard?.emoji || "\u2B50") || reaction.emoji.name === "\u{1F31F}") && config.starboard?.channel',
|
|
3288
3288
|
actions: [
|
|
3289
3289
|
// Remove star record
|
|
3290
3290
|
{
|
|
@@ -3313,11 +3313,11 @@ var starboardEventHandlers = [
|
|
|
3313
3313
|
},
|
|
3314
3314
|
{
|
|
3315
3315
|
action: "flow_if",
|
|
3316
|
-
condition: "
|
|
3316
|
+
condition: "existing.length > 0",
|
|
3317
3317
|
then: [
|
|
3318
3318
|
{
|
|
3319
3319
|
action: "flow_if",
|
|
3320
|
-
condition: "
|
|
3320
|
+
condition: "starCount < (config.starboard.threshold || 3)",
|
|
3321
3321
|
then: [
|
|
3322
3322
|
// Remove from starboard
|
|
3323
3323
|
{
|
|
@@ -3384,7 +3384,7 @@ var starboardCommands = [
|
|
|
3384
3384
|
},
|
|
3385
3385
|
{
|
|
3386
3386
|
action: "flow_if",
|
|
3387
|
-
condition: "
|
|
3387
|
+
condition: "args.threshold",
|
|
3388
3388
|
then: [
|
|
3389
3389
|
{
|
|
3390
3390
|
action: "set",
|
|
@@ -3396,7 +3396,7 @@ var starboardCommands = [
|
|
|
3396
3396
|
},
|
|
3397
3397
|
{
|
|
3398
3398
|
action: "flow_if",
|
|
3399
|
-
condition: "
|
|
3399
|
+
condition: "args.emoji",
|
|
3400
3400
|
then: [
|
|
3401
3401
|
{
|
|
3402
3402
|
action: "set",
|
|
@@ -3462,7 +3462,7 @@ var starboardCommands = [
|
|
|
3462
3462
|
},
|
|
3463
3463
|
{
|
|
3464
3464
|
action: "flow_if",
|
|
3465
|
-
condition: "
|
|
3465
|
+
condition: "allMessages.length === 0",
|
|
3466
3466
|
then: [
|
|
3467
3467
|
{ action: "reply", content: "No starred messages yet!", ephemeral: true },
|
|
3468
3468
|
{ action: "abort" }
|
|
@@ -3524,7 +3524,7 @@ var pollsEventHandlers = [
|
|
|
3524
3524
|
// Handle vote button
|
|
3525
3525
|
{
|
|
3526
3526
|
event: "button_click",
|
|
3527
|
-
condition: '
|
|
3527
|
+
condition: 'interaction.customId.startsWith("poll_vote_")',
|
|
3528
3528
|
actions: [
|
|
3529
3529
|
{
|
|
3530
3530
|
action: "set",
|
|
@@ -3549,7 +3549,7 @@ var pollsEventHandlers = [
|
|
|
3549
3549
|
},
|
|
3550
3550
|
{
|
|
3551
3551
|
action: "flow_if",
|
|
3552
|
-
condition: "
|
|
3552
|
+
condition: "!poll[0] || poll[0].ended",
|
|
3553
3553
|
then: [
|
|
3554
3554
|
{ action: "reply", content: "This poll has ended!", ephemeral: true },
|
|
3555
3555
|
{ action: "abort" }
|
|
@@ -3564,7 +3564,7 @@ var pollsEventHandlers = [
|
|
|
3564
3564
|
},
|
|
3565
3565
|
{
|
|
3566
3566
|
action: "flow_if",
|
|
3567
|
-
condition: "
|
|
3567
|
+
condition: "!poll[0].multiple_choice && existingVotes.length > 0",
|
|
3568
3568
|
then: [
|
|
3569
3569
|
// Change vote
|
|
3570
3570
|
{
|
|
@@ -3732,7 +3732,7 @@ var pollsCommands = [
|
|
|
3732
3732
|
},
|
|
3733
3733
|
{
|
|
3734
3734
|
action: "flow_if",
|
|
3735
|
-
condition: "
|
|
3735
|
+
condition: "optionTexts.length < 2",
|
|
3736
3736
|
then: [
|
|
3737
3737
|
{ action: "reply", content: "You need at least 2 options!", ephemeral: true },
|
|
3738
3738
|
{ action: "abort" }
|
|
@@ -3740,7 +3740,7 @@ var pollsCommands = [
|
|
|
3740
3740
|
},
|
|
3741
3741
|
{
|
|
3742
3742
|
action: "flow_if",
|
|
3743
|
-
condition: "
|
|
3743
|
+
condition: "optionTexts.length > (config.polls?.maxOptions || 10)",
|
|
3744
3744
|
then: [
|
|
3745
3745
|
{ action: "reply", content: "Maximum ${config.polls?.maxOptions || 10} options allowed!", ephemeral: true },
|
|
3746
3746
|
{ action: "abort" }
|
|
@@ -3844,7 +3844,7 @@ var pollsCommands = [
|
|
|
3844
3844
|
},
|
|
3845
3845
|
{
|
|
3846
3846
|
action: "flow_if",
|
|
3847
|
-
condition: "
|
|
3847
|
+
condition: "!poll[0]",
|
|
3848
3848
|
then: [
|
|
3849
3849
|
{ action: "reply", content: "Poll not found!", ephemeral: true },
|
|
3850
3850
|
{ action: "abort" }
|
|
@@ -3852,7 +3852,7 @@ var pollsCommands = [
|
|
|
3852
3852
|
},
|
|
3853
3853
|
{
|
|
3854
3854
|
action: "flow_if",
|
|
3855
|
-
condition: '
|
|
3855
|
+
condition: 'poll[0].creator_id !== user.id && !member.permissions.has("MANAGE_MESSAGES")',
|
|
3856
3856
|
then: [
|
|
3857
3857
|
{ action: "reply", content: "You can only end your own polls!", ephemeral: true },
|
|
3858
3858
|
{ action: "abort" }
|
|
@@ -3911,7 +3911,7 @@ var giveawaysEventHandlers = [
|
|
|
3911
3911
|
// Handle giveaway button click
|
|
3912
3912
|
{
|
|
3913
3913
|
event: "button_click",
|
|
3914
|
-
condition: '
|
|
3914
|
+
condition: 'interaction.customId.startsWith("giveaway_enter_")',
|
|
3915
3915
|
actions: [
|
|
3916
3916
|
{
|
|
3917
3917
|
action: "set",
|
|
@@ -3926,7 +3926,7 @@ var giveawaysEventHandlers = [
|
|
|
3926
3926
|
},
|
|
3927
3927
|
{
|
|
3928
3928
|
action: "flow_if",
|
|
3929
|
-
condition: "
|
|
3929
|
+
condition: "!giveaway[0] || giveaway[0].ended",
|
|
3930
3930
|
then: [
|
|
3931
3931
|
{ action: "reply", content: "This giveaway has ended!", ephemeral: true },
|
|
3932
3932
|
{ action: "abort" }
|
|
@@ -3935,7 +3935,7 @@ var giveawaysEventHandlers = [
|
|
|
3935
3935
|
// Check role requirement
|
|
3936
3936
|
{
|
|
3937
3937
|
action: "flow_if",
|
|
3938
|
-
condition: "
|
|
3938
|
+
condition: "giveaway[0].require_role && !member.roles.cache.has(giveaway[0].require_role)",
|
|
3939
3939
|
then: [
|
|
3940
3940
|
{ action: "reply", content: "You need the <@&${giveaway[0].require_role}> role to enter!", ephemeral: true },
|
|
3941
3941
|
{ action: "abort" }
|
|
@@ -3950,7 +3950,7 @@ var giveawaysEventHandlers = [
|
|
|
3950
3950
|
},
|
|
3951
3951
|
{
|
|
3952
3952
|
action: "flow_if",
|
|
3953
|
-
condition: "
|
|
3953
|
+
condition: "existing.length > 0",
|
|
3954
3954
|
then: [
|
|
3955
3955
|
// Remove entry
|
|
3956
3956
|
{
|
|
@@ -4048,7 +4048,7 @@ var giveawaysEventHandlers = [
|
|
|
4048
4048
|
// Update message
|
|
4049
4049
|
{
|
|
4050
4050
|
action: "flow_if",
|
|
4051
|
-
condition: "
|
|
4051
|
+
condition: "winners.length === 0",
|
|
4052
4052
|
then: [
|
|
4053
4053
|
{
|
|
4054
4054
|
action: "edit_message",
|
|
@@ -4197,7 +4197,7 @@ var giveawaysCommands = [
|
|
|
4197
4197
|
},
|
|
4198
4198
|
{
|
|
4199
4199
|
action: "flow_if",
|
|
4200
|
-
condition: "
|
|
4200
|
+
condition: "!giveaway[0]",
|
|
4201
4201
|
then: [
|
|
4202
4202
|
{ action: "reply", content: "Giveaway not found!", ephemeral: true },
|
|
4203
4203
|
{ action: "abort" }
|
|
@@ -4231,7 +4231,7 @@ var giveawaysCommands = [
|
|
|
4231
4231
|
},
|
|
4232
4232
|
{
|
|
4233
4233
|
action: "flow_if",
|
|
4234
|
-
condition: "
|
|
4234
|
+
condition: "!giveaway[0] || !giveaway[0].ended",
|
|
4235
4235
|
then: [
|
|
4236
4236
|
{ action: "reply", content: "Giveaway not found or not ended!", ephemeral: true },
|
|
4237
4237
|
{ action: "abort" }
|
|
@@ -4255,7 +4255,7 @@ var giveawaysCommands = [
|
|
|
4255
4255
|
},
|
|
4256
4256
|
{
|
|
4257
4257
|
action: "flow_if",
|
|
4258
|
-
condition: "
|
|
4258
|
+
condition: "winners.length === 0",
|
|
4259
4259
|
then: [
|
|
4260
4260
|
{ action: "reply", content: "No valid entries to reroll!", ephemeral: true },
|
|
4261
4261
|
{ action: "abort" }
|
|
@@ -4331,7 +4331,7 @@ var autoResponderTables = {
|
|
|
4331
4331
|
var autoResponderEventHandlers = [
|
|
4332
4332
|
{
|
|
4333
4333
|
event: "message",
|
|
4334
|
-
condition: "
|
|
4334
|
+
condition: "!message.author.bot || !config.autoResponder?.ignoreBots",
|
|
4335
4335
|
actions: [
|
|
4336
4336
|
// Get all triggers for this guild
|
|
4337
4337
|
{
|
|
@@ -4346,34 +4346,34 @@ var autoResponderEventHandlers = [
|
|
|
4346
4346
|
items: "${triggers}",
|
|
4347
4347
|
each: {
|
|
4348
4348
|
action: "flow_if",
|
|
4349
|
-
condition: '
|
|
4349
|
+
condition: '(() => { const t = item; const msg = t.ignore_case ? message.content.toLowerCase() : message.content; const trig = t.ignore_case ? t.trigger.toLowerCase() : t.trigger; switch(t.trigger_type) { case "exact": return msg === trig; case "contains": return msg.includes(trig); case "startswith": return msg.startsWith(trig); case "endswith": return msg.endsWith(trig); case "regex": return new RegExp(t.trigger, t.ignore_case ? "i" : "").test(message.content); default: return false; } })()',
|
|
4350
4350
|
then: [
|
|
4351
4351
|
// Check channel restrictions
|
|
4352
4352
|
{
|
|
4353
4353
|
action: "flow_if",
|
|
4354
|
-
condition: "
|
|
4354
|
+
condition: "item.allowed_channels?.length && !item.allowed_channels.includes(channel.id)",
|
|
4355
4355
|
then: [{ action: "abort" }]
|
|
4356
4356
|
},
|
|
4357
4357
|
{
|
|
4358
4358
|
action: "flow_if",
|
|
4359
|
-
condition: "
|
|
4359
|
+
condition: "item.ignored_channels?.includes(channel.id)",
|
|
4360
4360
|
then: [{ action: "abort" }]
|
|
4361
4361
|
},
|
|
4362
4362
|
// Check role restrictions
|
|
4363
4363
|
{
|
|
4364
4364
|
action: "flow_if",
|
|
4365
|
-
condition: "
|
|
4365
|
+
condition: "item.allowed_roles?.length && !item.allowed_roles.some(r => member.roles.cache.has(r))",
|
|
4366
4366
|
then: [{ action: "abort" }]
|
|
4367
4367
|
},
|
|
4368
4368
|
{
|
|
4369
4369
|
action: "flow_if",
|
|
4370
|
-
condition: "
|
|
4370
|
+
condition: "item.ignored_roles?.some(r => member.roles.cache.has(r))",
|
|
4371
4371
|
then: [{ action: "abort" }]
|
|
4372
4372
|
},
|
|
4373
4373
|
// Check cooldown
|
|
4374
4374
|
{
|
|
4375
4375
|
action: "flow_if",
|
|
4376
|
-
condition: "
|
|
4376
|
+
condition: "item.cooldown > 0",
|
|
4377
4377
|
then: [
|
|
4378
4378
|
{
|
|
4379
4379
|
action: "db_query",
|
|
@@ -4383,7 +4383,7 @@ var autoResponderEventHandlers = [
|
|
|
4383
4383
|
},
|
|
4384
4384
|
{
|
|
4385
4385
|
action: "flow_if",
|
|
4386
|
-
condition: "
|
|
4386
|
+
condition: "cooldown[0] && (now() - new Date(cooldown[0].last_triggered)) < item.cooldown * 1000",
|
|
4387
4387
|
then: [{ action: "abort" }]
|
|
4388
4388
|
}
|
|
4389
4389
|
]
|
|
@@ -4391,7 +4391,7 @@ var autoResponderEventHandlers = [
|
|
|
4391
4391
|
// Check chance
|
|
4392
4392
|
{
|
|
4393
4393
|
action: "flow_if",
|
|
4394
|
-
condition: "
|
|
4394
|
+
condition: "item.chance < 100 && random(1, 100) > item.chance",
|
|
4395
4395
|
then: [{ action: "abort" }]
|
|
4396
4396
|
},
|
|
4397
4397
|
// Execute response
|
|
@@ -4402,7 +4402,7 @@ var autoResponderEventHandlers = [
|
|
|
4402
4402
|
message: [
|
|
4403
4403
|
{
|
|
4404
4404
|
action: "flow_if",
|
|
4405
|
-
condition: "
|
|
4405
|
+
condition: "item.dm_response",
|
|
4406
4406
|
then: [
|
|
4407
4407
|
{ action: "send_dm", user: "${user.id}", content: "${item.response}" }
|
|
4408
4408
|
],
|
|
@@ -4414,7 +4414,7 @@ var autoResponderEventHandlers = [
|
|
|
4414
4414
|
embed: [
|
|
4415
4415
|
{
|
|
4416
4416
|
action: "flow_if",
|
|
4417
|
-
condition: "
|
|
4417
|
+
condition: "item.dm_response",
|
|
4418
4418
|
then: [
|
|
4419
4419
|
{ action: "send_dm", user: "${user.id}", embed: "${item.embed_data}" }
|
|
4420
4420
|
],
|
|
@@ -4431,7 +4431,7 @@ var autoResponderEventHandlers = [
|
|
|
4431
4431
|
// Delete trigger message if configured
|
|
4432
4432
|
{
|
|
4433
4433
|
action: "flow_if",
|
|
4434
|
-
condition: "
|
|
4434
|
+
condition: "item.delete_trigger",
|
|
4435
4435
|
then: [
|
|
4436
4436
|
{ action: "delete_message", channel: "${channel.id}", message: "${message.id}" }
|
|
4437
4437
|
]
|
|
@@ -4439,7 +4439,7 @@ var autoResponderEventHandlers = [
|
|
|
4439
4439
|
// Update cooldown
|
|
4440
4440
|
{
|
|
4441
4441
|
action: "flow_if",
|
|
4442
|
-
condition: "
|
|
4442
|
+
condition: "item.cooldown > 0",
|
|
4443
4443
|
then: [
|
|
4444
4444
|
{
|
|
4445
4445
|
action: "db_update",
|
|
@@ -4486,7 +4486,7 @@ var autoResponderCommands = [
|
|
|
4486
4486
|
},
|
|
4487
4487
|
{
|
|
4488
4488
|
action: "flow_if",
|
|
4489
|
-
condition: "
|
|
4489
|
+
condition: "existing.length >= (config.autoResponder?.maxTriggers || 50)",
|
|
4490
4490
|
then: [
|
|
4491
4491
|
{ action: "reply", content: "Maximum triggers reached!", ephemeral: true },
|
|
4492
4492
|
{ action: "abort" }
|
|
@@ -4524,7 +4524,7 @@ var autoResponderCommands = [
|
|
|
4524
4524
|
},
|
|
4525
4525
|
{
|
|
4526
4526
|
action: "flow_if",
|
|
4527
|
-
condition: "
|
|
4527
|
+
condition: "triggers.length === 0",
|
|
4528
4528
|
then: [
|
|
4529
4529
|
{ action: "reply", content: "No auto-responses configured!", ephemeral: true },
|
|
4530
4530
|
{ action: "abort" }
|
|
@@ -4562,7 +4562,7 @@ var autoResponderCommands = [
|
|
|
4562
4562
|
},
|
|
4563
4563
|
{
|
|
4564
4564
|
action: "flow_if",
|
|
4565
|
-
condition: "
|
|
4565
|
+
condition: "trigger.length === 0",
|
|
4566
4566
|
then: [
|
|
4567
4567
|
{ action: "reply", content: "Trigger not found!", ephemeral: true },
|
|
4568
4568
|
{ action: "abort" }
|
|
@@ -4604,7 +4604,7 @@ var autoResponderCommands = [
|
|
|
4604
4604
|
},
|
|
4605
4605
|
{
|
|
4606
4606
|
action: "flow_if",
|
|
4607
|
-
condition: "
|
|
4607
|
+
condition: "trigger.length === 0",
|
|
4608
4608
|
then: [
|
|
4609
4609
|
{ action: "reply", content: "Trigger not found!", ephemeral: true },
|
|
4610
4610
|
{ action: "abort" }
|
|
@@ -4657,7 +4657,7 @@ var afkEventHandlers = [
|
|
|
4657
4657
|
// Remove AFK when user sends message
|
|
4658
4658
|
{
|
|
4659
4659
|
event: "message",
|
|
4660
|
-
condition: "
|
|
4660
|
+
condition: "!message.author.bot",
|
|
4661
4661
|
actions: [
|
|
4662
4662
|
{
|
|
4663
4663
|
action: "db_query",
|
|
@@ -4667,7 +4667,7 @@ var afkEventHandlers = [
|
|
|
4667
4667
|
},
|
|
4668
4668
|
{
|
|
4669
4669
|
action: "flow_if",
|
|
4670
|
-
condition: "
|
|
4670
|
+
condition: "afkStatus.length > 0",
|
|
4671
4671
|
then: [
|
|
4672
4672
|
// Remove AFK
|
|
4673
4673
|
{
|
|
@@ -4678,7 +4678,7 @@ var afkEventHandlers = [
|
|
|
4678
4678
|
// Remove nickname prefix if set
|
|
4679
4679
|
{
|
|
4680
4680
|
action: "flow_if",
|
|
4681
|
-
condition: "
|
|
4681
|
+
condition: "config.afk?.nicknamePrefix && member.nickname?.startsWith(config.afk.nicknamePrefix)",
|
|
4682
4682
|
then: [
|
|
4683
4683
|
{
|
|
4684
4684
|
action: "set_nickname",
|
|
@@ -4709,7 +4709,7 @@ var afkEventHandlers = [
|
|
|
4709
4709
|
// Notify when AFK user is mentioned
|
|
4710
4710
|
{
|
|
4711
4711
|
event: "message",
|
|
4712
|
-
condition: "
|
|
4712
|
+
condition: "message.mentions.users.size > 0 && !message.author.bot",
|
|
4713
4713
|
actions: [
|
|
4714
4714
|
{
|
|
4715
4715
|
action: "set",
|
|
@@ -4729,7 +4729,7 @@ var afkEventHandlers = [
|
|
|
4729
4729
|
},
|
|
4730
4730
|
{
|
|
4731
4731
|
action: "flow_if",
|
|
4732
|
-
condition: "
|
|
4732
|
+
condition: "afkMentioned.length > 0",
|
|
4733
4733
|
then: [
|
|
4734
4734
|
{
|
|
4735
4735
|
action: "set",
|
|
@@ -4778,7 +4778,7 @@ var afkCommands = [
|
|
|
4778
4778
|
},
|
|
4779
4779
|
{
|
|
4780
4780
|
action: "flow_if",
|
|
4781
|
-
condition: "
|
|
4781
|
+
condition: "existing.length > 0",
|
|
4782
4782
|
then: [
|
|
4783
4783
|
{
|
|
4784
4784
|
action: "db_update",
|
|
@@ -4803,7 +4803,7 @@ var afkCommands = [
|
|
|
4803
4803
|
// Add nickname prefix if configured
|
|
4804
4804
|
{
|
|
4805
4805
|
action: "flow_if",
|
|
4806
|
-
condition: "
|
|
4806
|
+
condition: "config.afk?.nicknamePrefix && !member.nickname?.startsWith(config.afk.nicknamePrefix)",
|
|
4807
4807
|
then: [
|
|
4808
4808
|
{
|
|
4809
4809
|
action: "set_nickname",
|
|
@@ -4886,7 +4886,7 @@ var remindersEventHandlers = [
|
|
|
4886
4886
|
// Send reminder
|
|
4887
4887
|
{
|
|
4888
4888
|
action: "flow_if",
|
|
4889
|
-
condition: "
|
|
4889
|
+
condition: "reminder.dm",
|
|
4890
4890
|
then: [
|
|
4891
4891
|
{
|
|
4892
4892
|
action: "send_dm",
|
|
@@ -4929,7 +4929,7 @@ var remindersCommands = [
|
|
|
4929
4929
|
},
|
|
4930
4930
|
{
|
|
4931
4931
|
action: "flow_if",
|
|
4932
|
-
condition: "
|
|
4932
|
+
condition: "userReminders.length >= (config.reminders?.maxRemindersPerUser || 25)",
|
|
4933
4933
|
then: [
|
|
4934
4934
|
{ action: "reply", content: "You have too many reminders! Delete some first.", ephemeral: true },
|
|
4935
4935
|
{ action: "abort" }
|
|
@@ -4981,7 +4981,7 @@ var remindersCommands = [
|
|
|
4981
4981
|
},
|
|
4982
4982
|
{
|
|
4983
4983
|
action: "flow_if",
|
|
4984
|
-
condition: "
|
|
4984
|
+
condition: "reminders.length === 0",
|
|
4985
4985
|
then: [
|
|
4986
4986
|
{ action: "reply", content: "You have no reminders!", ephemeral: true },
|
|
4987
4987
|
{ action: "abort" }
|
|
@@ -5019,7 +5019,7 @@ var remindersCommands = [
|
|
|
5019
5019
|
},
|
|
5020
5020
|
{
|
|
5021
5021
|
action: "flow_if",
|
|
5022
|
-
condition: "
|
|
5022
|
+
condition: "reminder.length === 0",
|
|
5023
5023
|
then: [
|
|
5024
5024
|
{ action: "reply", content: "Reminder not found or not yours!", ephemeral: true },
|
|
5025
5025
|
{ action: "abort" }
|
|
@@ -5057,7 +5057,7 @@ var utilitiesCommands = [
|
|
|
5057
5057
|
{
|
|
5058
5058
|
action: "set",
|
|
5059
5059
|
key: "boostLevel",
|
|
5060
|
-
value: '${["None", "Level 1", "Level 2", "Level 3"][guild.
|
|
5060
|
+
value: '${["None", "Level 1", "Level 2", "Level 3"][guild.premium_tier]}'
|
|
5061
5061
|
},
|
|
5062
5062
|
{
|
|
5063
5063
|
action: "set",
|
|
@@ -5068,17 +5068,17 @@ var utilitiesCommands = [
|
|
|
5068
5068
|
action: "reply",
|
|
5069
5069
|
embed: {
|
|
5070
5070
|
title: "${guild.name}",
|
|
5071
|
-
thumbnail: "${guild.
|
|
5071
|
+
thumbnail: "${guild.icon}",
|
|
5072
5072
|
color: "#5865f2",
|
|
5073
5073
|
fields: [
|
|
5074
|
-
{ name: "Owner", value: "<@${guild.
|
|
5075
|
-
{ name: "Created", value: '${timestamp(guild.
|
|
5076
|
-
{ name: "Members", value: "${guild.
|
|
5077
|
-
{ name: "Channels", value: "${guild.
|
|
5078
|
-
{ name: "Roles", value: "${guild.
|
|
5079
|
-
{ name: "Emojis", value: "${guild.
|
|
5074
|
+
{ name: "Owner", value: "<@${guild.owner_id}>", inline: true },
|
|
5075
|
+
{ name: "Created", value: '${timestamp(guild.created_at, "R")}', inline: true },
|
|
5076
|
+
{ name: "Members", value: "${guild.member_count}", inline: true },
|
|
5077
|
+
{ name: "Channels", value: "${guild.channel_count}", inline: true },
|
|
5078
|
+
{ name: "Roles", value: "${guild.role_count}", inline: true },
|
|
5079
|
+
{ name: "Emojis", value: "${guild.emoji_count}", inline: true },
|
|
5080
5080
|
{ name: "Boost Level", value: "${boostLevel}", inline: true },
|
|
5081
|
-
{ name: "Boosts", value: "${guild.
|
|
5081
|
+
{ name: "Boosts", value: "${guild.boost_count || 0}", inline: true },
|
|
5082
5082
|
{ name: "Verification", value: "${verificationLevel}", inline: true }
|
|
5083
5083
|
],
|
|
5084
5084
|
footer: { text: "ID: ${guild.id}" }
|
|
@@ -5101,27 +5101,27 @@ var utilitiesCommands = [
|
|
|
5101
5101
|
{
|
|
5102
5102
|
action: "set",
|
|
5103
5103
|
key: "targetMember",
|
|
5104
|
-
value: "${
|
|
5104
|
+
value: "${options.member || member}"
|
|
5105
5105
|
},
|
|
5106
5106
|
{
|
|
5107
5107
|
action: "set",
|
|
5108
5108
|
key: "roles",
|
|
5109
|
-
value: '${targetMember
|
|
5109
|
+
value: '${targetMember.roles | slice(0, 10) | join(", ") || "None"}'
|
|
5110
5110
|
},
|
|
5111
5111
|
{
|
|
5112
5112
|
action: "reply",
|
|
5113
5113
|
embed: {
|
|
5114
5114
|
title: "${targetUser.tag}",
|
|
5115
|
-
thumbnail: "${targetUser.
|
|
5116
|
-
color:
|
|
5115
|
+
thumbnail: "${targetUser.avatar}",
|
|
5116
|
+
color: "#5865f2",
|
|
5117
5117
|
fields: [
|
|
5118
5118
|
{ name: "Username", value: "${targetUser.username}", inline: true },
|
|
5119
|
-
{ name: "Nickname", value: '${targetMember
|
|
5119
|
+
{ name: "Nickname", value: '${targetMember.nickname || "None"}', inline: true },
|
|
5120
5120
|
{ name: "Bot", value: '${targetUser.bot ? "Yes" : "No"}', inline: true },
|
|
5121
|
-
{ name: "Created", value: '${timestamp(targetUser.
|
|
5122
|
-
{ name: "Joined", value: '${
|
|
5123
|
-
{ name: "Highest Role", value: '${targetMember
|
|
5124
|
-
{ name: "Roles
|
|
5121
|
+
{ name: "Created", value: '${timestamp(targetUser.created_at, "R")}', inline: true },
|
|
5122
|
+
{ name: "Joined", value: '${timestamp(targetMember.joined_at, "R")}', inline: true },
|
|
5123
|
+
{ name: "Highest Role", value: '${targetMember.highest_role || "None"}', inline: true },
|
|
5124
|
+
{ name: "Roles", value: "${roles}", inline: false }
|
|
5125
5125
|
],
|
|
5126
5126
|
footer: { text: "ID: ${targetUser.id}" }
|
|
5127
5127
|
}
|
|
@@ -5144,9 +5144,9 @@ var utilitiesCommands = [
|
|
|
5144
5144
|
action: "reply",
|
|
5145
5145
|
embed: {
|
|
5146
5146
|
title: "${targetUser.tag}'s Avatar",
|
|
5147
|
-
image: "${targetUser.
|
|
5147
|
+
image: "${targetUser.avatar}",
|
|
5148
5148
|
color: "#5865f2",
|
|
5149
|
-
description:
|
|
5149
|
+
description: "Click the image to view full size"
|
|
5150
5150
|
}
|
|
5151
5151
|
}
|
|
5152
5152
|
]
|
|
@@ -5165,7 +5165,7 @@ var utilitiesCommands = [
|
|
|
5165
5165
|
},
|
|
5166
5166
|
{
|
|
5167
5167
|
action: "flow_if",
|
|
5168
|
-
condition: "
|
|
5168
|
+
condition: "!targetUser.banner",
|
|
5169
5169
|
then: [
|
|
5170
5170
|
{ action: "reply", content: "This user has no banner!", ephemeral: true },
|
|
5171
5171
|
{ action: "abort" }
|
|
@@ -5175,7 +5175,7 @@ var utilitiesCommands = [
|
|
|
5175
5175
|
action: "reply",
|
|
5176
5176
|
embed: {
|
|
5177
5177
|
title: "${targetUser.tag}'s Banner",
|
|
5178
|
-
image: "${targetUser.
|
|
5178
|
+
image: "${targetUser.banner}",
|
|
5179
5179
|
color: "#5865f2"
|
|
5180
5180
|
}
|
|
5181
5181
|
}
|
|
@@ -5282,7 +5282,7 @@ var utilitiesCommands = [
|
|
|
5282
5282
|
title: "Member Count",
|
|
5283
5283
|
color: "#5865f2",
|
|
5284
5284
|
fields: [
|
|
5285
|
-
{ name: "Total", value: "${guild.
|
|
5285
|
+
{ name: "Total", value: "${guild.member_count}", inline: true },
|
|
5286
5286
|
{ name: "Humans", value: "${humans}", inline: true },
|
|
5287
5287
|
{ name: "Bots", value: "${bots}", inline: true }
|
|
5288
5288
|
]
|