@notidotbot/noti-api-client 1.9.38 → 1.9.40
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/classes/guildClipForward.d.ts +37 -349
- package/dist/classes/guildClipForward.js +10 -0
- package/dist/classes/guildStatChannels.d.ts +56 -0
- package/dist/classes/guildStatChannels.js +22 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/other/offlineGrace.d.ts +14 -0
- package/dist/other/offlineGrace.js +14 -1
- package/dist/other/templates.d.ts +204 -2
- package/dist/other/templates.js +177 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/prisma/schema/models/twitterStreamer.prisma +1 -1
|
@@ -127,6 +127,26 @@ export declare const placeholders: {
|
|
|
127
127
|
saves: string;
|
|
128
128
|
randomMessage: string;
|
|
129
129
|
};
|
|
130
|
+
whatnot: {
|
|
131
|
+
platform: string;
|
|
132
|
+
liveUrl: string;
|
|
133
|
+
streamerName: string;
|
|
134
|
+
streamTitle: string;
|
|
135
|
+
streamThumbnail: string;
|
|
136
|
+
pingRole: string;
|
|
137
|
+
orders: string;
|
|
138
|
+
randomMessage: string;
|
|
139
|
+
};
|
|
140
|
+
twitter: {
|
|
141
|
+
platform: string;
|
|
142
|
+
liveUrl: string;
|
|
143
|
+
streamerName: string;
|
|
144
|
+
streamTitle: string;
|
|
145
|
+
streamThumbnail: string;
|
|
146
|
+
pingRole: string;
|
|
147
|
+
viewers: string;
|
|
148
|
+
randomMessage: string;
|
|
149
|
+
};
|
|
130
150
|
};
|
|
131
151
|
offline: {
|
|
132
152
|
kick: {
|
|
@@ -175,6 +195,28 @@ export declare const placeholders: {
|
|
|
175
195
|
verified: string;
|
|
176
196
|
randomMessage: string;
|
|
177
197
|
};
|
|
198
|
+
whatnot: {
|
|
199
|
+
platform: string;
|
|
200
|
+
liveUrl: string;
|
|
201
|
+
streamerName: string;
|
|
202
|
+
streamThumbnail: string;
|
|
203
|
+
duration: string;
|
|
204
|
+
pingRole: string;
|
|
205
|
+
orders: string;
|
|
206
|
+
randomMessage: string;
|
|
207
|
+
};
|
|
208
|
+
twitter: {
|
|
209
|
+
platform: string;
|
|
210
|
+
liveUrl: string;
|
|
211
|
+
streamerName: string;
|
|
212
|
+
streamTitle: string;
|
|
213
|
+
streamThumbnail: string;
|
|
214
|
+
duration: string;
|
|
215
|
+
pingRole: string;
|
|
216
|
+
viewers: string;
|
|
217
|
+
streamerUrl: string;
|
|
218
|
+
randomMessage: string;
|
|
219
|
+
};
|
|
178
220
|
};
|
|
179
221
|
video: {
|
|
180
222
|
tiktok: {
|
|
@@ -232,6 +274,18 @@ export declare const placeholders: {
|
|
|
232
274
|
publishDate: string;
|
|
233
275
|
randomMessage: string;
|
|
234
276
|
};
|
|
277
|
+
twitter: {
|
|
278
|
+
platform: string;
|
|
279
|
+
postUrl: string;
|
|
280
|
+
creatorName: string;
|
|
281
|
+
pingRole: string;
|
|
282
|
+
postText: string;
|
|
283
|
+
thumbnail: string;
|
|
284
|
+
videoUrl: string;
|
|
285
|
+
fxUrl: string;
|
|
286
|
+
publishDate: string;
|
|
287
|
+
randomMessage: string;
|
|
288
|
+
};
|
|
235
289
|
};
|
|
236
290
|
birthday: {
|
|
237
291
|
username: string;
|
|
@@ -308,6 +362,15 @@ export declare const buttons: {
|
|
|
308
362
|
style: number;
|
|
309
363
|
url: string;
|
|
310
364
|
}[];
|
|
365
|
+
post: ({
|
|
366
|
+
label: string;
|
|
367
|
+
style: number;
|
|
368
|
+
url: string;
|
|
369
|
+
} | {
|
|
370
|
+
label: string;
|
|
371
|
+
style: number;
|
|
372
|
+
url?: undefined;
|
|
373
|
+
})[];
|
|
311
374
|
live: ({
|
|
312
375
|
label: string;
|
|
313
376
|
style?: undefined;
|
|
@@ -593,6 +656,61 @@ export declare const messages: {
|
|
|
593
656
|
url: string;
|
|
594
657
|
})[];
|
|
595
658
|
};
|
|
659
|
+
whatnot: {
|
|
660
|
+
content: string;
|
|
661
|
+
embed: {
|
|
662
|
+
title: string;
|
|
663
|
+
description: string;
|
|
664
|
+
image: {
|
|
665
|
+
url: string;
|
|
666
|
+
};
|
|
667
|
+
url: string;
|
|
668
|
+
color: number;
|
|
669
|
+
fields: {
|
|
670
|
+
name: string;
|
|
671
|
+
value: string;
|
|
672
|
+
inline: boolean;
|
|
673
|
+
}[];
|
|
674
|
+
};
|
|
675
|
+
buttons: ({
|
|
676
|
+
label: string;
|
|
677
|
+
style?: undefined;
|
|
678
|
+
url?: undefined;
|
|
679
|
+
} | {
|
|
680
|
+
label: string;
|
|
681
|
+
style: number;
|
|
682
|
+
url?: undefined;
|
|
683
|
+
} | {
|
|
684
|
+
label: string;
|
|
685
|
+
style: number;
|
|
686
|
+
url: string;
|
|
687
|
+
})[];
|
|
688
|
+
};
|
|
689
|
+
twitter: {
|
|
690
|
+
content: string;
|
|
691
|
+
embed: {
|
|
692
|
+
title: string;
|
|
693
|
+
description: string;
|
|
694
|
+
image: {
|
|
695
|
+
url: string;
|
|
696
|
+
};
|
|
697
|
+
url: string;
|
|
698
|
+
color: number;
|
|
699
|
+
};
|
|
700
|
+
buttons: ({
|
|
701
|
+
label: string;
|
|
702
|
+
style?: undefined;
|
|
703
|
+
url?: undefined;
|
|
704
|
+
} | {
|
|
705
|
+
label: string;
|
|
706
|
+
style: number;
|
|
707
|
+
url?: undefined;
|
|
708
|
+
} | {
|
|
709
|
+
label: string;
|
|
710
|
+
style: number;
|
|
711
|
+
url: string;
|
|
712
|
+
})[];
|
|
713
|
+
};
|
|
596
714
|
};
|
|
597
715
|
offline: {
|
|
598
716
|
kick: {
|
|
@@ -699,6 +817,58 @@ export declare const messages: {
|
|
|
699
817
|
url?: undefined;
|
|
700
818
|
})[];
|
|
701
819
|
};
|
|
820
|
+
whatnot: {
|
|
821
|
+
content: string;
|
|
822
|
+
embed: {
|
|
823
|
+
title: string;
|
|
824
|
+
description: string;
|
|
825
|
+
image: {
|
|
826
|
+
url: string;
|
|
827
|
+
};
|
|
828
|
+
url: string;
|
|
829
|
+
color: number;
|
|
830
|
+
fields: {
|
|
831
|
+
name: string;
|
|
832
|
+
value: string;
|
|
833
|
+
inline: boolean;
|
|
834
|
+
}[];
|
|
835
|
+
};
|
|
836
|
+
buttons: ({
|
|
837
|
+
label: string;
|
|
838
|
+
style: number;
|
|
839
|
+
url: string;
|
|
840
|
+
} | {
|
|
841
|
+
label: string;
|
|
842
|
+
style: number;
|
|
843
|
+
url?: undefined;
|
|
844
|
+
})[];
|
|
845
|
+
};
|
|
846
|
+
twitter: {
|
|
847
|
+
content: string;
|
|
848
|
+
embed: {
|
|
849
|
+
title: string;
|
|
850
|
+
description: string;
|
|
851
|
+
image: {
|
|
852
|
+
url: string;
|
|
853
|
+
};
|
|
854
|
+
url: string;
|
|
855
|
+
color: number;
|
|
856
|
+
fields: {
|
|
857
|
+
name: string;
|
|
858
|
+
value: string;
|
|
859
|
+
inline: boolean;
|
|
860
|
+
}[];
|
|
861
|
+
};
|
|
862
|
+
buttons: ({
|
|
863
|
+
label: string;
|
|
864
|
+
style: number;
|
|
865
|
+
url: string;
|
|
866
|
+
} | {
|
|
867
|
+
label: string;
|
|
868
|
+
style: number;
|
|
869
|
+
url?: undefined;
|
|
870
|
+
})[];
|
|
871
|
+
};
|
|
702
872
|
};
|
|
703
873
|
video: {
|
|
704
874
|
tiktok: {
|
|
@@ -748,11 +918,43 @@ export declare const messages: {
|
|
|
748
918
|
icon_url: string;
|
|
749
919
|
};
|
|
750
920
|
};
|
|
751
|
-
buttons: {
|
|
921
|
+
buttons: ({
|
|
752
922
|
label: string;
|
|
753
923
|
style: number;
|
|
754
924
|
url: string;
|
|
755
|
-
}
|
|
925
|
+
} | {
|
|
926
|
+
label: string;
|
|
927
|
+
style: number;
|
|
928
|
+
url?: undefined;
|
|
929
|
+
})[];
|
|
930
|
+
};
|
|
931
|
+
twitter: {
|
|
932
|
+
content: string;
|
|
933
|
+
embed: {
|
|
934
|
+
author: {
|
|
935
|
+
name: string;
|
|
936
|
+
url: string;
|
|
937
|
+
};
|
|
938
|
+
url: string;
|
|
939
|
+
description: string;
|
|
940
|
+
color: number;
|
|
941
|
+
image: {
|
|
942
|
+
url: string;
|
|
943
|
+
};
|
|
944
|
+
footer: {
|
|
945
|
+
text: string;
|
|
946
|
+
icon_url: string;
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
buttons: ({
|
|
950
|
+
label: string;
|
|
951
|
+
style: number;
|
|
952
|
+
url: string;
|
|
953
|
+
} | {
|
|
954
|
+
label: string;
|
|
955
|
+
style: number;
|
|
956
|
+
url?: undefined;
|
|
957
|
+
})[];
|
|
756
958
|
};
|
|
757
959
|
};
|
|
758
960
|
birthday: {
|
package/dist/other/templates.js
CHANGED
|
@@ -130,6 +130,26 @@ exports.placeholders = {
|
|
|
130
130
|
'saves': '239.9K',
|
|
131
131
|
'randomMessage': 'Example Message',
|
|
132
132
|
},
|
|
133
|
+
whatnot: {
|
|
134
|
+
'platform': 'Whatnot',
|
|
135
|
+
'liveUrl': 'https://example.com',
|
|
136
|
+
'streamerName': 'Example',
|
|
137
|
+
'streamTitle': 'Example Stream Title',
|
|
138
|
+
'streamThumbnail': 'https://example.com',
|
|
139
|
+
'pingRole': '<@&123456789>',
|
|
140
|
+
'orders': '42',
|
|
141
|
+
'randomMessage': 'Example Message',
|
|
142
|
+
},
|
|
143
|
+
twitter: {
|
|
144
|
+
'platform': 'X',
|
|
145
|
+
'liveUrl': 'https://x.com/i/broadcasts/123',
|
|
146
|
+
'streamerName': 'Example',
|
|
147
|
+
'streamTitle': 'Example Broadcast Title',
|
|
148
|
+
'streamThumbnail': 'https://example.com',
|
|
149
|
+
'pingRole': '<@&123456789>',
|
|
150
|
+
'viewers': '42',
|
|
151
|
+
'randomMessage': 'Example Message',
|
|
152
|
+
},
|
|
133
153
|
},
|
|
134
154
|
offline: {
|
|
135
155
|
kick: {
|
|
@@ -178,6 +198,33 @@ exports.placeholders = {
|
|
|
178
198
|
'verified': 'Verified / Not Verified',
|
|
179
199
|
'randomMessage': 'Example Message',
|
|
180
200
|
},
|
|
201
|
+
whatnot: {
|
|
202
|
+
'platform': 'Whatnot',
|
|
203
|
+
'liveUrl': 'https://example.com',
|
|
204
|
+
'streamerName': 'Example',
|
|
205
|
+
'streamThumbnail': 'https://example.com',
|
|
206
|
+
'duration': '4h 20m',
|
|
207
|
+
'pingRole': '<@&123456789>',
|
|
208
|
+
'orders': '42',
|
|
209
|
+
'randomMessage': 'Example Message',
|
|
210
|
+
},
|
|
211
|
+
twitter: {
|
|
212
|
+
'platform': 'X',
|
|
213
|
+
'liveUrl': 'https://x.com/i/broadcasts/123',
|
|
214
|
+
'streamerName': 'Example',
|
|
215
|
+
'streamTitle': 'Example Broadcast Title',
|
|
216
|
+
'streamThumbnail': 'https://example.com',
|
|
217
|
+
'duration': '4h 20m',
|
|
218
|
+
// Every live and offline platform must declare pingRole - the bot guards it, because the
|
|
219
|
+
// Whatnot offline once omitted it and silently pinged nobody for months.
|
|
220
|
+
'pingRole': '<@&123456789>',
|
|
221
|
+
'viewers': '42',
|
|
222
|
+
// buttons.offline points at {streamerUrl}. The other platforms leave it unresolvable and are
|
|
223
|
+
// grandfathered in the bot's guard; X supplies it instead - the creator's profile, which is
|
|
224
|
+
// where a viewer wants to go once the broadcast has ended.
|
|
225
|
+
'streamerUrl': 'https://x.com/example',
|
|
226
|
+
'randomMessage': 'Example Message',
|
|
227
|
+
},
|
|
181
228
|
},
|
|
182
229
|
video: {
|
|
183
230
|
tiktok: {
|
|
@@ -235,6 +282,18 @@ exports.placeholders = {
|
|
|
235
282
|
'publishDate': '<t:1640995200:R>',
|
|
236
283
|
'randomMessage': 'Example Message',
|
|
237
284
|
},
|
|
285
|
+
twitter: {
|
|
286
|
+
'platform': 'X',
|
|
287
|
+
'postUrl': 'https://x.com/example/status/123',
|
|
288
|
+
'creatorName': 'Example',
|
|
289
|
+
'pingRole': '<@&123456789>',
|
|
290
|
+
'postText': 'Example post text',
|
|
291
|
+
'thumbnail': 'https://example.com',
|
|
292
|
+
'videoUrl': 'https://video.twimg.com/example.mp4',
|
|
293
|
+
'fxUrl': 'https://fixupx.com/example/status/123',
|
|
294
|
+
'publishDate': '<t:1640995200:R>',
|
|
295
|
+
'randomMessage': 'Example Message',
|
|
296
|
+
},
|
|
238
297
|
},
|
|
239
298
|
birthday: {
|
|
240
299
|
'username': 'Example',
|
|
@@ -335,6 +394,24 @@ exports.buttons = {
|
|
|
335
394
|
style: 5,
|
|
336
395
|
url: '{videoUrl}',
|
|
337
396
|
}],
|
|
397
|
+
// Creator posts. NOT `video` - a post has no {videoUrl}; placeholders.post carries {postUrl}, so
|
|
398
|
+
// pointing this at video's set described a button that could never resolve. This key existed in the
|
|
399
|
+
// bot and was missing here entirely, which is why messages.post.club pointed at buttons.video.
|
|
400
|
+
//
|
|
401
|
+
// One per action row, so they stack vertically rather than sitting in a row of three. Each is
|
|
402
|
+
// independently gated, so a server can legitimately receive a post with no buttons at all.
|
|
403
|
+
post: [{
|
|
404
|
+
label: 'Visit Post',
|
|
405
|
+
style: 5,
|
|
406
|
+
url: '{postUrl}',
|
|
407
|
+
}, {
|
|
408
|
+
label: 'Toggle Notification',
|
|
409
|
+
style: 2,
|
|
410
|
+
}, {
|
|
411
|
+
label: 'Invite Noti!',
|
|
412
|
+
style: 5,
|
|
413
|
+
url: 'https://discord.com/...',
|
|
414
|
+
}],
|
|
338
415
|
live: [{
|
|
339
416
|
label: 'Watch {streamerName} on {platform}!',
|
|
340
417
|
}, {
|
|
@@ -579,6 +656,35 @@ exports.messages = {
|
|
|
579
656
|
embed: {},
|
|
580
657
|
buttons: exports.buttons.live,
|
|
581
658
|
},
|
|
659
|
+
whatnot: {
|
|
660
|
+
content: '{pingRole} {randomMessage}',
|
|
661
|
+
embed: {
|
|
662
|
+
title: '{streamerName} is now live on Whatnot!',
|
|
663
|
+
description: '> {streamTitle}',
|
|
664
|
+
image: { url: '{streamThumbnail}' },
|
|
665
|
+
url: '{liveUrl}',
|
|
666
|
+
color: 0xffd000,
|
|
667
|
+
fields: [{
|
|
668
|
+
name: '• Orders',
|
|
669
|
+
value: '> {orders}',
|
|
670
|
+
inline: true,
|
|
671
|
+
}],
|
|
672
|
+
},
|
|
673
|
+
buttons: exports.buttons.live,
|
|
674
|
+
},
|
|
675
|
+
twitter: {
|
|
676
|
+
content: '{pingRole} {randomMessage}',
|
|
677
|
+
embed: {
|
|
678
|
+
title: '{streamerName} is now live on X!',
|
|
679
|
+
description: '> {streamTitle}',
|
|
680
|
+
image: { url: '{streamThumbnail}' },
|
|
681
|
+
url: '{liveUrl}',
|
|
682
|
+
color: 0x1da1f2,
|
|
683
|
+
// No viewer count by default. {viewers} stays declared, so a server can add the field back
|
|
684
|
+
// in its own template - the offline embed still shows it, where a final count is the point.
|
|
685
|
+
},
|
|
686
|
+
buttons: exports.buttons.live,
|
|
687
|
+
},
|
|
582
688
|
},
|
|
583
689
|
offline: {
|
|
584
690
|
kick: {
|
|
@@ -669,6 +775,48 @@ exports.messages = {
|
|
|
669
775
|
},
|
|
670
776
|
buttons: exports.buttons.offline,
|
|
671
777
|
},
|
|
778
|
+
whatnot: {
|
|
779
|
+
content: '{pingRole} {randomMessage}',
|
|
780
|
+
embed: {
|
|
781
|
+
title: '{streamerName} is now offline!',
|
|
782
|
+
description: '> Their Whatnot livestream has ended.',
|
|
783
|
+
image: { url: '{streamThumbnail}' },
|
|
784
|
+
url: '{liveUrl}',
|
|
785
|
+
color: 0xff4c4c,
|
|
786
|
+
fields: [{
|
|
787
|
+
name: '• Duration',
|
|
788
|
+
value: '> {duration}',
|
|
789
|
+
inline: true,
|
|
790
|
+
}, {
|
|
791
|
+
name: '• Orders',
|
|
792
|
+
value: '> {orders}',
|
|
793
|
+
inline: true,
|
|
794
|
+
}],
|
|
795
|
+
},
|
|
796
|
+
buttons: exports.buttons.offline,
|
|
797
|
+
},
|
|
798
|
+
twitter: {
|
|
799
|
+
content: '{pingRole} {randomMessage}',
|
|
800
|
+
embed: {
|
|
801
|
+
title: '{streamerName} was live on X',
|
|
802
|
+
description: '> {streamTitle}',
|
|
803
|
+
// The ENDED page serves a REPLAY thumbnail and the final view count, so the edited card
|
|
804
|
+
// stops showing a live frame the moment the broadcast is over.
|
|
805
|
+
image: { url: '{streamThumbnail}' },
|
|
806
|
+
url: '{liveUrl}',
|
|
807
|
+
color: 0x1da1f2,
|
|
808
|
+
fields: [{
|
|
809
|
+
name: '• Duration',
|
|
810
|
+
value: '> {duration}',
|
|
811
|
+
inline: true,
|
|
812
|
+
}, {
|
|
813
|
+
name: '• Viewers',
|
|
814
|
+
value: '> {viewers}',
|
|
815
|
+
inline: true,
|
|
816
|
+
}],
|
|
817
|
+
},
|
|
818
|
+
buttons: exports.buttons.offline,
|
|
819
|
+
},
|
|
672
820
|
},
|
|
673
821
|
video: {
|
|
674
822
|
tiktok: {
|
|
@@ -701,7 +849,35 @@ exports.messages = {
|
|
|
701
849
|
icon_url: 'https://noti.bot/logo.png',
|
|
702
850
|
},
|
|
703
851
|
},
|
|
704
|
-
|
|
852
|
+
// Was `buttons.video`, which the bot has never used here - a post has no {videoUrl}. Corrected
|
|
853
|
+
// alongside adding `buttons.post`, which this copy was missing entirely.
|
|
854
|
+
buttons: exports.buttons.post,
|
|
855
|
+
},
|
|
856
|
+
twitter: {
|
|
857
|
+
// {fxUrl} is the DEFAULT rendering for an X post: Discord unfurls fixupx itself and shows the
|
|
858
|
+
// real tweet - inline video, multi-image, quotes, polls - which the embed cannot reproduce.
|
|
859
|
+
//
|
|
860
|
+
// The embed below is only sent when a server has EDITED it (AnyMessageEditor, Server Premium).
|
|
861
|
+
// That is why the two coexist: an unfurl is suppressed by an embed on the same message, so it
|
|
862
|
+
// is one or the other, chosen by whether a custom embed exists.
|
|
863
|
+
//
|
|
864
|
+
// {videoUrl} is NOT in the content - the unfurled post already plays the video. The url is
|
|
865
|
+
// BARE and on its own line, unlike the live and video templates which quote theirs, because
|
|
866
|
+
// here the unfurl IS the notification and anything wrapped around the url is one more thing
|
|
867
|
+
// between Discord and rendering the post.
|
|
868
|
+
content: '{pingRole} {randomMessage}\n\n{fxUrl}',
|
|
869
|
+
embed: {
|
|
870
|
+
author: { name: '{creatorName} posted on X', url: '{postUrl}' },
|
|
871
|
+
url: '{postUrl}',
|
|
872
|
+
description: '{postText}',
|
|
873
|
+
color: 0x1da1f2,
|
|
874
|
+
image: { url: '{thumbnail}' },
|
|
875
|
+
footer: {
|
|
876
|
+
text: 'Powered by Noti.',
|
|
877
|
+
icon_url: 'https://noti.bot/logo.png',
|
|
878
|
+
},
|
|
879
|
+
},
|
|
880
|
+
buttons: exports.buttons.post,
|
|
705
881
|
},
|
|
706
882
|
},
|
|
707
883
|
birthday: {
|