@overlaysymphony/twitch 0.2.1 → 0.2.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/package.json +2 -2
- package/src/authentication/authentication.ts +1 -1
- package/src/authentication/index.ts +1 -1
- package/src/chat/chat.ts +4 -4
- package/src/chat/helpers.ts +1 -1
- package/src/chat/index.ts +4 -3
- package/src/chat/interfaces/index.ts +2 -2
- package/src/chat/parser.ts +1 -1
- package/src/eventsub/events/automod.message.hold-2.ts +81 -0
- package/src/eventsub/events/automod.message.update-2.ts +94 -0
- package/src/eventsub/events/automod.settings.update-1.ts +65 -0
- package/src/eventsub/events/automod.terms.update-1.ts +59 -0
- package/src/eventsub/events/channel.ad_break.begin-1.ts +50 -0
- package/src/eventsub/events/channel.ban-1.ts +58 -0
- package/src/eventsub/events/channel.bits.use-1.ts +112 -0
- package/src/eventsub/events/channel.channel_points_automatic_reward_redemption.add-2.ts +88 -0
- package/src/eventsub/events/channel.channel_points_custom_reward.add-1.ts +101 -0
- package/src/eventsub/events/channel.channel_points_custom_reward.remove-1.ts +103 -0
- package/src/eventsub/events/channel.channel_points_custom_reward.update-1.ts +103 -0
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add-1.ts +65 -0
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update-1.ts +65 -0
- package/src/eventsub/events/channel.charity_campaign.donate-1.ts +69 -0
- package/src/eventsub/events/channel.charity_campaign.progress-1.ts +74 -0
- package/src/eventsub/events/channel.charity_campaign.start-1.ts +76 -0
- package/src/eventsub/events/channel.charity_campaign.stop-1.ts +76 -0
- package/src/eventsub/events/channel.chat.clear-1.ts +41 -0
- package/src/eventsub/events/channel.chat.clear_user_messages-1.ts +47 -0
- package/src/eventsub/events/channel.chat.message-1.ts +160 -0
- package/src/eventsub/events/channel.chat.message_delete-1.ts +49 -0
- package/src/eventsub/events/channel.chat.notification-1.ts +317 -0
- package/src/eventsub/events/channel.chat.user_message_hold-1.ts +75 -0
- package/src/eventsub/events/channel.chat.user_message_update-1.ts +82 -0
- package/src/eventsub/events/channel.chat_settings.update-1.ts +83 -0
- package/src/eventsub/events/channel.cheer-1.ts +50 -0
- package/src/eventsub/events/channel.follow-2.ts +49 -0
- package/src/eventsub/events/channel.goal.begin-1.ts +80 -0
- package/src/eventsub/events/channel.goal.end-1.ts +80 -0
- package/src/eventsub/events/channel.goal.progress-1.ts +80 -0
- package/src/eventsub/events/channel.guest_star_guest.update-beta.ts +85 -0
- package/src/eventsub/events/channel.guest_star_session.begin-beta.ts +50 -0
- package/src/eventsub/events/channel.guest_star_session.end-beta.ts +58 -0
- package/src/eventsub/events/channel.guest_star_settings.update-beta.ts +62 -0
- package/src/eventsub/events/channel.hype_train.begin-2.ts +90 -0
- package/src/eventsub/events/channel.hype_train.end-2.ts +70 -0
- package/src/eventsub/events/channel.hype_train.progress-2.ts +90 -0
- package/src/eventsub/events/channel.moderate-2.ts +258 -0
- package/src/eventsub/events/channel.moderator.add-1.ts +44 -0
- package/src/eventsub/events/channel.moderator.remove-1.ts +44 -0
- package/src/eventsub/events/channel.poll.begin-1.ts +73 -0
- package/src/eventsub/events/channel.poll.end-1.ts +75 -0
- package/src/eventsub/events/channel.poll.progress-1.ts +73 -0
- package/src/eventsub/events/channel.prediction.begin-1.ts +72 -0
- package/src/eventsub/events/channel.prediction.end-1.ts +76 -0
- package/src/eventsub/events/channel.prediction.lock-1.ts +72 -0
- package/src/eventsub/events/channel.prediction.progress-1.ts +72 -0
- package/src/eventsub/events/channel.raid-1.ts +48 -0
- package/src/eventsub/events/channel.shared_chat.begin-1.ts +55 -0
- package/src/eventsub/events/channel.shared_chat.end-1.ts +46 -0
- package/src/eventsub/events/channel.shared_chat.update-1.ts +55 -0
- package/src/eventsub/events/channel.shield_mode.begin-1.ts +51 -0
- package/src/eventsub/events/channel.shield_mode.end-1.ts +51 -0
- package/src/eventsub/events/channel.shoutout.create-1.ts +61 -0
- package/src/eventsub/events/channel.shoutout.receive-1.ts +51 -0
- package/src/eventsub/events/channel.subscribe-1.ts +48 -0
- package/src/eventsub/events/channel.subscription.end-1.ts +48 -0
- package/src/eventsub/events/channel.subscription.gift-1.ts +52 -0
- package/src/eventsub/events/channel.subscription.message-1.ts +66 -0
- package/src/eventsub/events/channel.suspicious_user.message-1.ts +85 -0
- package/src/eventsub/events/channel.suspicious_user.update-1.ts +55 -0
- package/src/eventsub/events/channel.unban-1.ts +50 -0
- package/src/eventsub/events/channel.unban_request.create-1.ts +53 -0
- package/src/eventsub/events/channel.unban_request.resolve-1.ts +64 -0
- package/src/eventsub/events/channel.update-2.ts +48 -0
- package/src/eventsub/events/channel.vip.add-1.ts +44 -0
- package/src/eventsub/events/channel.vip.remove-1.ts +44 -0
- package/src/eventsub/events/channel.warning.acknowledge-1.ts +47 -0
- package/src/eventsub/events/channel.warning.send-1.ts +57 -0
- package/src/eventsub/events/index.ts +73 -284
- package/src/eventsub/events/stream.offline-1.ts +38 -0
- package/src/eventsub/events/stream.online-1.ts +44 -0
- package/src/eventsub/events/user.update-1.ts +48 -0
- package/src/eventsub/events/user.whisper.message-1.ts +51 -0
- package/src/eventsub/events-helpers.ts +53 -25
- package/src/eventsub/eventsub.ts +37 -74
- package/src/eventsub/index.ts +8 -6
- package/src/eventsub/messages.ts +16 -4
- package/src/helix/channel-points/custom-rewards.ts +3 -3
- package/src/helix/channel-points/index.ts +1 -1
- package/src/helix/helix.ts +1 -1
- package/src/helix/subscriptions/index.ts +1 -1
- package/src/helix/subscriptions/subscriptions.ts +40 -47
- package/src/helix/users/index.ts +1 -1
- package/src/helix/users/users.ts +3 -3
- package/src/helpers/alerts/alerts.ts +5 -5
- package/src/helpers/alerts/index.ts +2 -2
- package/src/helpers/charity/charity.ts +2 -2
- package/src/helpers/charity/index.ts +1 -1
- package/src/helpers/goal/goal.ts +2 -2
- package/src/helpers/goal/index.ts +1 -1
- package/src/helpers/hype-train/hype-train.ts +2 -2
- package/src/helpers/hype-train/index.ts +1 -1
- package/src/helpers/poll/index.ts +1 -1
- package/src/helpers/poll/poll.ts +3 -3
- package/src/helpers/prediction/index.ts +1 -1
- package/src/helpers/prediction/prediction.ts +3 -3
- package/src/helpers/redemption/index.ts +1 -1
- package/src/helpers/redemption/redemption.ts +3 -3
- package/src/helpers/status/index.ts +1 -1
- package/src/helpers/status/status.ts +2 -2
- package/src/ui/authentication.ts +1 -1
- package/src/ui/popup.ts +26 -3
- package/src/eventsub/events/channel.ad_break.begin.ts +0 -51
- package/src/eventsub/events/channel.ban.ts +0 -59
- package/src/eventsub/events/channel.channel_points_custom_reward._.ts +0 -29
- package/src/eventsub/events/channel.channel_points_custom_reward.add.ts +0 -75
- package/src/eventsub/events/channel.channel_points_custom_reward.remove.ts +0 -77
- package/src/eventsub/events/channel.channel_points_custom_reward.update.ts +0 -77
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption._.ts +0 -10
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add.ts +0 -59
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update.ts +0 -59
- package/src/eventsub/events/channel.charity_campaign.donate.ts +0 -66
- package/src/eventsub/events/channel.charity_campaign.progress.ts +0 -67
- package/src/eventsub/events/channel.charity_campaign.start.ts +0 -69
- package/src/eventsub/events/channel.charity_campaign.stop.ts +0 -69
- package/src/eventsub/events/channel.chat.clear.ts +0 -42
- package/src/eventsub/events/channel.chat.clear_user_messages.ts +0 -48
- package/src/eventsub/events/channel.chat.message_delete.ts +0 -50
- package/src/eventsub/events/channel.chat.notification.ts +0 -50
- package/src/eventsub/events/channel.cheer.ts +0 -51
- package/src/eventsub/events/channel.follow.ts +0 -50
- package/src/eventsub/events/channel.goal.begin.ts +0 -51
- package/src/eventsub/events/channel.goal.end.ts +0 -55
- package/src/eventsub/events/channel.goal.progress.ts +0 -51
- package/src/eventsub/events/channel.guest_star_guest.update.ts +0 -66
- package/src/eventsub/events/channel.guest_star_session.begin.ts +0 -46
- package/src/eventsub/events/channel.guest_star_session.end.ts +0 -48
- package/src/eventsub/events/channel.guest_star_settings.update.ts +0 -50
- package/src/eventsub/events/channel.hype_train._.ts +0 -12
- package/src/eventsub/events/channel.hype_train.begin.ts +0 -57
- package/src/eventsub/events/channel.hype_train.end.ts +0 -55
- package/src/eventsub/events/channel.hype_train.progress.ts +0 -70
- package/src/eventsub/events/channel.moderator.add.ts +0 -45
- package/src/eventsub/events/channel.moderator.remove.ts +0 -45
- package/src/eventsub/events/channel.poll._.ts +0 -26
- package/src/eventsub/events/channel.poll.begin.ts +0 -55
- package/src/eventsub/events/channel.poll.end.ts +0 -57
- package/src/eventsub/events/channel.poll.progress.ts +0 -55
- package/src/eventsub/events/channel.prediction._.ts +0 -25
- package/src/eventsub/events/channel.prediction.begin.ts +0 -51
- package/src/eventsub/events/channel.prediction.end.ts +0 -55
- package/src/eventsub/events/channel.prediction.lock.ts +0 -51
- package/src/eventsub/events/channel.prediction.progress.ts +0 -51
- package/src/eventsub/events/channel.raid.ts +0 -49
- package/src/eventsub/events/channel.shield_mode.begin.ts +0 -50
- package/src/eventsub/events/channel.shield_mode.end.ts +0 -50
- package/src/eventsub/events/channel.shoutout.create.ts +0 -62
- package/src/eventsub/events/channel.shoutout.receive.ts +0 -52
- package/src/eventsub/events/channel.subscribe.ts +0 -49
- package/src/eventsub/events/channel.subscription.end.ts +0 -49
- package/src/eventsub/events/channel.subscription.gift.ts +0 -53
- package/src/eventsub/events/channel.subscription.message.ts +0 -67
- package/src/eventsub/events/channel.unban.ts +0 -51
- package/src/eventsub/events/channel.update.ts +0 -49
- package/src/eventsub/events/stream.offline.ts +0 -39
- package/src/eventsub/events/stream.online.ts +0 -45
- package/src/eventsub/events/user.update.ts +0 -45
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.channel_points_automatic_reward_redemption.add": ChannelChannelPointsAutomaticRewardRedemptionAdd
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Channel Points Automatic Reward Redemption Add v2: When a viewer has redeemed an automatic channel points reward on the specified channel. */
|
|
10
|
+
type ChannelChannelPointsAutomaticRewardRedemptionAdd = EventConfig<{
|
|
11
|
+
Type: "channel.channel_points_automatic_reward_redemption.add"
|
|
12
|
+
Version: "2"
|
|
13
|
+
/** The conditions to listen for when a viewer has redeemed an automatic channel points reward on the specified channel. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The broadcaster user ID for the channel you want to receive channel points reward add notifications for. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
}
|
|
18
|
+
/** The event fired when a viewer has redeemed an automatic channel points reward on the specified channel. */
|
|
19
|
+
Event: {
|
|
20
|
+
/** The ID of the channel where the reward was redeemed. */
|
|
21
|
+
broadcaster_user_id: string
|
|
22
|
+
/** The login of the channel where the reward was redeemed. */
|
|
23
|
+
broadcaster_user_login: string
|
|
24
|
+
/** The display name of the channel where the reward was redeemed. */
|
|
25
|
+
broadcaster_user_name: string
|
|
26
|
+
/** The ID of the redeeming user. */
|
|
27
|
+
user_id: string
|
|
28
|
+
/** The login of the redeeming user. */
|
|
29
|
+
user_login: string
|
|
30
|
+
/** The display name of the redeeming user. */
|
|
31
|
+
user_name: string
|
|
32
|
+
/** The ID of the Redemption. */
|
|
33
|
+
id: string
|
|
34
|
+
/** An object that contains the reward information. */
|
|
35
|
+
reward: {
|
|
36
|
+
/**
|
|
37
|
+
* The type of reward. One of:
|
|
38
|
+
* - single_message_bypass_sub_mode
|
|
39
|
+
* - send_highlighted_message
|
|
40
|
+
* - random_sub_emote_unlock
|
|
41
|
+
* - chosen_sub_emote_unlock
|
|
42
|
+
* - chosen_modified_sub_emote_unlock
|
|
43
|
+
* - message_effect
|
|
44
|
+
* - gigantify_an_emote
|
|
45
|
+
* - celebration
|
|
46
|
+
*/
|
|
47
|
+
type: string
|
|
48
|
+
/** The reward cost. */
|
|
49
|
+
cost: number
|
|
50
|
+
/** Emote that was unlocked. */
|
|
51
|
+
unlocked_emote?: {
|
|
52
|
+
/** The emote ID. */
|
|
53
|
+
id: string
|
|
54
|
+
/** The human readable emote token. */
|
|
55
|
+
name: string
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** An object that contains the user message and emote information needed to recreate the message. */
|
|
59
|
+
message: {
|
|
60
|
+
/** The text of the chat message. */
|
|
61
|
+
text: string
|
|
62
|
+
/** An array that includes the emote ID and start and end positions for where the emote appears in the text. */
|
|
63
|
+
emotes: Array<{
|
|
64
|
+
/** The emote ID. */
|
|
65
|
+
id: string
|
|
66
|
+
/** The index of where the Emote starts in the text. */
|
|
67
|
+
begin: number
|
|
68
|
+
/** The index of where the Emote ends in the text. */
|
|
69
|
+
end: number
|
|
70
|
+
}>
|
|
71
|
+
}
|
|
72
|
+
/** A string that the user entered if the reward requires input. */
|
|
73
|
+
user_input?: string
|
|
74
|
+
/** The UTC date and time (in RFC3339 format) of when the reward was redeemed. */
|
|
75
|
+
redeemed_at: string
|
|
76
|
+
}
|
|
77
|
+
}>
|
|
78
|
+
|
|
79
|
+
registerEvent("channel.channel_points_automatic_reward_redemption.add", {
|
|
80
|
+
scopes: ["channel:manage:redemptions", "channel:read:redemptions"],
|
|
81
|
+
subscriber: (userId) => ({
|
|
82
|
+
type: "channel.channel_points_automatic_reward_redemption.add",
|
|
83
|
+
version: "2",
|
|
84
|
+
condition: {
|
|
85
|
+
broadcaster_user_id: userId,
|
|
86
|
+
},
|
|
87
|
+
}),
|
|
88
|
+
})
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.channel_points_custom_reward.add": ChannelChannelPointsCustomRewardAdd
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Channel Points Custom Reward Add v1: When a custom channel points reward has been created for the specified channel. */
|
|
10
|
+
type ChannelChannelPointsCustomRewardAdd = EventConfig<{
|
|
11
|
+
Type: "channel.channel_points_custom_reward.add"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when a custom channel points reward has been created for the specified channel. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The broadcaster user ID for the channel you want to receive channel points custom reward add notifications for. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
}
|
|
18
|
+
/** The event fired when a custom channel points reward has been created for the specified channel. */
|
|
19
|
+
Event: {
|
|
20
|
+
/** The reward identifier. */
|
|
21
|
+
id: string
|
|
22
|
+
/** The requested broadcaster ID. */
|
|
23
|
+
broadcaster_user_id: string
|
|
24
|
+
/** The requested broadcaster login. */
|
|
25
|
+
broadcaster_user_login: string
|
|
26
|
+
/** The requested broadcaster display name. */
|
|
27
|
+
broadcaster_user_name: string
|
|
28
|
+
/** Is the reward currently enabled. If false, the reward won't show up to viewers. */
|
|
29
|
+
is_enabled: boolean
|
|
30
|
+
/** Is the reward currently paused. If true, viewers can't redeem. */
|
|
31
|
+
is_paused: boolean
|
|
32
|
+
/** Is the reward currently in stock. If false, viewers can't redeem. */
|
|
33
|
+
is_in_stock: boolean
|
|
34
|
+
/** The reward title. */
|
|
35
|
+
title: string
|
|
36
|
+
/** The reward cost. */
|
|
37
|
+
cost: number
|
|
38
|
+
/** The reward description. */
|
|
39
|
+
prompt: string
|
|
40
|
+
/** Does the viewer need to enter information when redeeming the reward. */
|
|
41
|
+
is_user_input_required: boolean
|
|
42
|
+
/** Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status. */
|
|
43
|
+
should_redemptions_skip_request_queue: boolean
|
|
44
|
+
/** Whether a maximum per stream is enabled and what the maximum is. */
|
|
45
|
+
max_per_stream: {
|
|
46
|
+
/** Is the setting enabled. */
|
|
47
|
+
is_enabled: boolean
|
|
48
|
+
/** The max per stream limit. */
|
|
49
|
+
value: number
|
|
50
|
+
}
|
|
51
|
+
/** Whether a maximum per user per stream is enabled and what the maximum is. */
|
|
52
|
+
max_per_user_per_stream: {
|
|
53
|
+
/** Is the setting enabled. */
|
|
54
|
+
is_enabled: boolean
|
|
55
|
+
/** The max per user per stream limit. */
|
|
56
|
+
value: number
|
|
57
|
+
}
|
|
58
|
+
/** Custom background color for the reward. Format: Hex with # prefix. Example: #FA1ED2. */
|
|
59
|
+
background_color: string
|
|
60
|
+
/** Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. */
|
|
61
|
+
image: {
|
|
62
|
+
/** URL for the image at 1x size. */
|
|
63
|
+
url_1x: string
|
|
64
|
+
/** URL for the image at 2x size. */
|
|
65
|
+
url_2x: string
|
|
66
|
+
/** URL for the image at 4x size. */
|
|
67
|
+
url_4x: string
|
|
68
|
+
}
|
|
69
|
+
/** Set of default images of 1x, 2x and 4x sizes for the reward. */
|
|
70
|
+
default_image: {
|
|
71
|
+
/** URL for the image at 1x size. */
|
|
72
|
+
url_1x: string
|
|
73
|
+
/** URL for the image at 2x size. */
|
|
74
|
+
url_2x: string
|
|
75
|
+
/** URL for the image at 4x size. */
|
|
76
|
+
url_4x: string
|
|
77
|
+
}
|
|
78
|
+
/** Whether a cooldown is enabled and what the cooldown is in seconds. */
|
|
79
|
+
global_cooldown: {
|
|
80
|
+
/** Is the setting enabled. */
|
|
81
|
+
is_enabled: boolean
|
|
82
|
+
/** The cooldown in seconds. */
|
|
83
|
+
seconds: number
|
|
84
|
+
}
|
|
85
|
+
/** Timestamp of the cooldown expiration. null if the reward isn't on cooldown. */
|
|
86
|
+
cooldown_expires_at: string
|
|
87
|
+
/** The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn't live or max_per_stream isn't enabled. */
|
|
88
|
+
redemptions_redeemed_current_stream: number
|
|
89
|
+
}
|
|
90
|
+
}>
|
|
91
|
+
|
|
92
|
+
registerEvent("channel.channel_points_custom_reward.add", {
|
|
93
|
+
scopes: ["channel:manage:redemptions", "channel:read:redemptions"],
|
|
94
|
+
subscriber: (userId) => ({
|
|
95
|
+
type: "channel.channel_points_custom_reward.add",
|
|
96
|
+
version: "1",
|
|
97
|
+
condition: {
|
|
98
|
+
broadcaster_user_id: userId,
|
|
99
|
+
},
|
|
100
|
+
}),
|
|
101
|
+
})
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.channel_points_custom_reward.remove": ChannelChannelPointsCustomRewardRemove
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Channel Points Custom Reward Remove v1: When a custom channel points reward has been removed from the specified channel. */
|
|
10
|
+
type ChannelChannelPointsCustomRewardRemove = EventConfig<{
|
|
11
|
+
Type: "channel.channel_points_custom_reward.remove"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when a custom channel points reward has been removed from the specified channel. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The broadcaster user ID for the channel you want to receive channel points custom reward remove notifications for. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
/** Specify a reward id to only receive notifications for a specific reward. */
|
|
18
|
+
reward_id?: string
|
|
19
|
+
}
|
|
20
|
+
/** The event fired when a custom channel points reward has been removed from the specified channel. */
|
|
21
|
+
Event: {
|
|
22
|
+
/** The reward identifier. */
|
|
23
|
+
id: string
|
|
24
|
+
/** The requested broadcaster ID. */
|
|
25
|
+
broadcaster_user_id: string
|
|
26
|
+
/** The requested broadcaster login. */
|
|
27
|
+
broadcaster_user_login: string
|
|
28
|
+
/** The requested broadcaster display name. */
|
|
29
|
+
broadcaster_user_name: string
|
|
30
|
+
/** Is the reward currently enabled. If false, the reward won't show up to viewers. */
|
|
31
|
+
is_enabled: boolean
|
|
32
|
+
/** Is the reward currently paused. If true, viewers can't redeem. */
|
|
33
|
+
is_paused: boolean
|
|
34
|
+
/** Is the reward currently in stock. If false, viewers can't redeem. */
|
|
35
|
+
is_in_stock: boolean
|
|
36
|
+
/** The reward title. */
|
|
37
|
+
title: string
|
|
38
|
+
/** The reward cost. */
|
|
39
|
+
cost: number
|
|
40
|
+
/** The reward description. */
|
|
41
|
+
prompt: string
|
|
42
|
+
/** Does the viewer need to enter information when redeeming the reward. */
|
|
43
|
+
is_user_input_required: boolean
|
|
44
|
+
/** Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status. */
|
|
45
|
+
should_redemptions_skip_request_queue: boolean
|
|
46
|
+
/** Whether a maximum per stream is enabled and what the maximum is. */
|
|
47
|
+
max_per_stream: {
|
|
48
|
+
/** Is the setting enabled. */
|
|
49
|
+
is_enabled: boolean
|
|
50
|
+
/** The max per stream limit. */
|
|
51
|
+
value: number
|
|
52
|
+
}
|
|
53
|
+
/** Whether a maximum per user per stream is enabled and what the maximum is. */
|
|
54
|
+
max_per_user_per_stream: {
|
|
55
|
+
/** Is the setting enabled. */
|
|
56
|
+
is_enabled: boolean
|
|
57
|
+
/** The max per user per stream limit. */
|
|
58
|
+
value: number
|
|
59
|
+
}
|
|
60
|
+
/** Custom background color for the reward. Format: Hex with # prefix. Example: #FA1ED2. */
|
|
61
|
+
background_color: string
|
|
62
|
+
/** Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. */
|
|
63
|
+
image: {
|
|
64
|
+
/** URL for the image at 1x size. */
|
|
65
|
+
url_1x: string
|
|
66
|
+
/** URL for the image at 2x size. */
|
|
67
|
+
url_2x: string
|
|
68
|
+
/** URL for the image at 4x size. */
|
|
69
|
+
url_4x: string
|
|
70
|
+
}
|
|
71
|
+
/** Set of default images of 1x, 2x and 4x sizes for the reward. */
|
|
72
|
+
default_image: {
|
|
73
|
+
/** URL for the image at 1x size. */
|
|
74
|
+
url_1x: string
|
|
75
|
+
/** URL for the image at 2x size. */
|
|
76
|
+
url_2x: string
|
|
77
|
+
/** URL for the image at 4x size. */
|
|
78
|
+
url_4x: string
|
|
79
|
+
}
|
|
80
|
+
/** Whether a cooldown is enabled and what the cooldown is in seconds. */
|
|
81
|
+
global_cooldown: {
|
|
82
|
+
/** Is the setting enabled. */
|
|
83
|
+
is_enabled: boolean
|
|
84
|
+
/** The cooldown in seconds. */
|
|
85
|
+
seconds: number
|
|
86
|
+
}
|
|
87
|
+
/** Timestamp of the cooldown expiration. null if the reward isn't on cooldown. */
|
|
88
|
+
cooldown_expires_at: string
|
|
89
|
+
/** The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn't live or max_per_stream isn't enabled. */
|
|
90
|
+
redemptions_redeemed_current_stream: number
|
|
91
|
+
}
|
|
92
|
+
}>
|
|
93
|
+
|
|
94
|
+
registerEvent("channel.channel_points_custom_reward.remove", {
|
|
95
|
+
scopes: ["channel:manage:redemptions", "channel:read:redemptions"],
|
|
96
|
+
subscriber: (userId) => ({
|
|
97
|
+
type: "channel.channel_points_custom_reward.remove",
|
|
98
|
+
version: "1",
|
|
99
|
+
condition: {
|
|
100
|
+
broadcaster_user_id: userId,
|
|
101
|
+
},
|
|
102
|
+
}),
|
|
103
|
+
})
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.channel_points_custom_reward.update": ChannelChannelPointsCustomRewardUpdate
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Channel Points Custom Reward Update v1: When a custom channel points reward has been updated for the specified channel. */
|
|
10
|
+
type ChannelChannelPointsCustomRewardUpdate = EventConfig<{
|
|
11
|
+
Type: "channel.channel_points_custom_reward.update"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when a custom channel points reward has been updated for the specified channel. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The broadcaster user ID for the channel you want to receive channel points custom reward update notifications for. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
/** Specify a reward id to only receive notifications for a specific reward. */
|
|
18
|
+
reward_id?: string
|
|
19
|
+
}
|
|
20
|
+
/** The event fired when a custom channel points reward has been updated for the specified channel. */
|
|
21
|
+
Event: {
|
|
22
|
+
/** The reward identifier. */
|
|
23
|
+
id: string
|
|
24
|
+
/** The requested broadcaster ID. */
|
|
25
|
+
broadcaster_user_id: string
|
|
26
|
+
/** The requested broadcaster login. */
|
|
27
|
+
broadcaster_user_login: string
|
|
28
|
+
/** The requested broadcaster display name. */
|
|
29
|
+
broadcaster_user_name: string
|
|
30
|
+
/** Is the reward currently enabled. If false, the reward won't show up to viewers. */
|
|
31
|
+
is_enabled: boolean
|
|
32
|
+
/** Is the reward currently paused. If true, viewers can't redeem. */
|
|
33
|
+
is_paused: boolean
|
|
34
|
+
/** Is the reward currently in stock. If false, viewers can't redeem. */
|
|
35
|
+
is_in_stock: boolean
|
|
36
|
+
/** The reward title. */
|
|
37
|
+
title: string
|
|
38
|
+
/** The reward cost. */
|
|
39
|
+
cost: number
|
|
40
|
+
/** The reward description. */
|
|
41
|
+
prompt: string
|
|
42
|
+
/** Does the viewer need to enter information when redeeming the reward. */
|
|
43
|
+
is_user_input_required: boolean
|
|
44
|
+
/** Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status. */
|
|
45
|
+
should_redemptions_skip_request_queue: boolean
|
|
46
|
+
/** Whether a maximum per stream is enabled and what the maximum is. */
|
|
47
|
+
max_per_stream: {
|
|
48
|
+
/** Is the setting enabled. */
|
|
49
|
+
is_enabled: boolean
|
|
50
|
+
/** The max per stream limit. */
|
|
51
|
+
value: number
|
|
52
|
+
}
|
|
53
|
+
/** Whether a maximum per user per stream is enabled and what the maximum is. */
|
|
54
|
+
max_per_user_per_stream: {
|
|
55
|
+
/** Is the setting enabled. */
|
|
56
|
+
is_enabled: boolean
|
|
57
|
+
/** The max per user per stream limit. */
|
|
58
|
+
value: number
|
|
59
|
+
}
|
|
60
|
+
/** Custom background color for the reward. Format: Hex with # prefix. Example: #FA1ED2. */
|
|
61
|
+
background_color: string
|
|
62
|
+
/** Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. */
|
|
63
|
+
image: {
|
|
64
|
+
/** URL for the image at 1x size. */
|
|
65
|
+
url_1x: string
|
|
66
|
+
/** URL for the image at 2x size. */
|
|
67
|
+
url_2x: string
|
|
68
|
+
/** URL for the image at 4x size. */
|
|
69
|
+
url_4x: string
|
|
70
|
+
}
|
|
71
|
+
/** Set of default images of 1x, 2x and 4x sizes for the reward. */
|
|
72
|
+
default_image: {
|
|
73
|
+
/** URL for the image at 1x size. */
|
|
74
|
+
url_1x: string
|
|
75
|
+
/** URL for the image at 2x size. */
|
|
76
|
+
url_2x: string
|
|
77
|
+
/** URL for the image at 4x size. */
|
|
78
|
+
url_4x: string
|
|
79
|
+
}
|
|
80
|
+
/** Whether a cooldown is enabled and what the cooldown is in seconds. */
|
|
81
|
+
global_cooldown: {
|
|
82
|
+
/** Is the setting enabled. */
|
|
83
|
+
is_enabled: boolean
|
|
84
|
+
/** The cooldown in seconds. */
|
|
85
|
+
seconds: number
|
|
86
|
+
}
|
|
87
|
+
/** Timestamp of the cooldown expiration. null if the reward isn't on cooldown. */
|
|
88
|
+
cooldown_expires_at: string
|
|
89
|
+
/** The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn't live or max_per_stream isn't enabled. */
|
|
90
|
+
redemptions_redeemed_current_stream: number
|
|
91
|
+
}
|
|
92
|
+
}>
|
|
93
|
+
|
|
94
|
+
registerEvent("channel.channel_points_custom_reward.update", {
|
|
95
|
+
scopes: ["channel:manage:redemptions", "channel:read:redemptions"],
|
|
96
|
+
subscriber: (userId) => ({
|
|
97
|
+
type: "channel.channel_points_custom_reward.update",
|
|
98
|
+
version: "1",
|
|
99
|
+
condition: {
|
|
100
|
+
broadcaster_user_id: userId,
|
|
101
|
+
},
|
|
102
|
+
}),
|
|
103
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.channel_points_custom_reward_redemption.add": ChannelChannelPointsCustomRewardRedemptionAdd
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Channel Points Custom Reward Redemption Add v1: When a viewer has redeemed a custom channel points reward on the specified channel. */
|
|
10
|
+
type ChannelChannelPointsCustomRewardRedemptionAdd = EventConfig<{
|
|
11
|
+
Type: "channel.channel_points_custom_reward_redemption.add"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when a viewer has redeemed a custom channel points reward on the specified channel. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The broadcaster user ID for the channel you want to receive channel points custom reward redemption add notifications for. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
/** Specify a reward id to only receive notifications for a specific reward. */
|
|
18
|
+
reward_id?: string
|
|
19
|
+
}
|
|
20
|
+
/** The event fired when a viewer has redeemed a custom channel points reward on the specified channel. */
|
|
21
|
+
Event: {
|
|
22
|
+
/** The redemption identifier. */
|
|
23
|
+
id: string
|
|
24
|
+
/** The requested broadcaster ID. */
|
|
25
|
+
broadcaster_user_id: string
|
|
26
|
+
/** The requested broadcaster login. */
|
|
27
|
+
broadcaster_user_login: string
|
|
28
|
+
/** The requested broadcaster display name. */
|
|
29
|
+
broadcaster_user_name: string
|
|
30
|
+
/** User ID of the user that redeemed the reward. */
|
|
31
|
+
user_id: string
|
|
32
|
+
/** Login of the user that redeemed the reward. */
|
|
33
|
+
user_login: string
|
|
34
|
+
/** Display name of the user that redeemed the reward. */
|
|
35
|
+
user_name: string
|
|
36
|
+
/** The user input provided. Empty string if not provided. */
|
|
37
|
+
user_input: string
|
|
38
|
+
/** Defaults to unfulfilled. Possible values are unknown, unfulfilled, fulfilled, and canceled . */
|
|
39
|
+
status: string
|
|
40
|
+
/** Basic information about the reward that was redeemed, at the time it was redeemed. */
|
|
41
|
+
reward: {
|
|
42
|
+
/** The reward identifier. */
|
|
43
|
+
id: string
|
|
44
|
+
/** The reward name. */
|
|
45
|
+
title: string
|
|
46
|
+
/** The reward cost. */
|
|
47
|
+
cost: number
|
|
48
|
+
/** The reward description. */
|
|
49
|
+
prompt: string
|
|
50
|
+
}
|
|
51
|
+
/** RFC3339 timestamp of when the reward was redeemed. */
|
|
52
|
+
redeemed_at: string
|
|
53
|
+
}
|
|
54
|
+
}>
|
|
55
|
+
|
|
56
|
+
registerEvent("channel.channel_points_custom_reward_redemption.add", {
|
|
57
|
+
scopes: ["channel:manage:redemptions", "channel:read:redemptions"],
|
|
58
|
+
subscriber: (userId) => ({
|
|
59
|
+
type: "channel.channel_points_custom_reward_redemption.add",
|
|
60
|
+
version: "1",
|
|
61
|
+
condition: {
|
|
62
|
+
broadcaster_user_id: userId,
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.channel_points_custom_reward_redemption.update": ChannelChannelPointsCustomRewardRedemptionUpdate
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Channel Points Custom Reward Redemption Update v1: When a redemption of a channel points custom reward has been updated for the specified channel. */
|
|
10
|
+
type ChannelChannelPointsCustomRewardRedemptionUpdate = EventConfig<{
|
|
11
|
+
Type: "channel.channel_points_custom_reward_redemption.update"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when a redemption of a channel points custom reward has been updated for the specified channel. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The broadcaster user ID for the channel you want to receive channel points custom reward redemption update notifications for. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
/** Specify a reward id to only receive notifications for a specific reward. */
|
|
18
|
+
reward_id?: string
|
|
19
|
+
}
|
|
20
|
+
/** The event fired when a redemption of a channel points custom reward has been updated for the specified channel. */
|
|
21
|
+
Event: {
|
|
22
|
+
/** The redemption identifier. */
|
|
23
|
+
id: string
|
|
24
|
+
/** The requested broadcaster ID. */
|
|
25
|
+
broadcaster_user_id: string
|
|
26
|
+
/** The requested broadcaster login. */
|
|
27
|
+
broadcaster_user_login: string
|
|
28
|
+
/** The requested broadcaster display name. */
|
|
29
|
+
broadcaster_user_name: string
|
|
30
|
+
/** User ID of the user that redeemed the reward. */
|
|
31
|
+
user_id: string
|
|
32
|
+
/** Login of the user that redeemed the reward. */
|
|
33
|
+
user_login: string
|
|
34
|
+
/** Display name of the user that redeemed the reward. */
|
|
35
|
+
user_name: string
|
|
36
|
+
/** The user input provided. Empty string if not provided. */
|
|
37
|
+
user_input: string
|
|
38
|
+
/** Will be fulfilled or canceled. Possible values are unknown, unfulfilled, fulfilled, and canceled . */
|
|
39
|
+
status: string
|
|
40
|
+
/** Basic information about the reward that was redeemed, at the time it was redeemed. */
|
|
41
|
+
reward: {
|
|
42
|
+
/** The reward identifier. */
|
|
43
|
+
id: string
|
|
44
|
+
/** The reward name. */
|
|
45
|
+
title: string
|
|
46
|
+
/** The reward cost. */
|
|
47
|
+
cost: number
|
|
48
|
+
/** The reward description. */
|
|
49
|
+
prompt: string
|
|
50
|
+
}
|
|
51
|
+
/** RFC3339 timestamp of when the reward was redeemed. */
|
|
52
|
+
redeemed_at: string
|
|
53
|
+
}
|
|
54
|
+
}>
|
|
55
|
+
|
|
56
|
+
registerEvent("channel.channel_points_custom_reward_redemption.update", {
|
|
57
|
+
scopes: ["channel:manage:redemptions", "channel:read:redemptions"],
|
|
58
|
+
subscriber: (userId) => ({
|
|
59
|
+
type: "channel.channel_points_custom_reward_redemption.update",
|
|
60
|
+
version: "1",
|
|
61
|
+
condition: {
|
|
62
|
+
broadcaster_user_id: userId,
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
})
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.charity_campaign.donate": ChannelCharityCampaignDonate
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Charity Campaign Donate v1: When a user donates to the broadcaster's charity campaign. */
|
|
10
|
+
type ChannelCharityCampaignDonate = EventConfig<{
|
|
11
|
+
Type: "channel.charity_campaign.donate"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when a user donates to the broadcaster's charity campaign. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The ID of the broadcaster that you want to receive notifications about when users donate to their campaign. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
}
|
|
18
|
+
/** The event fired when a user donates to the broadcaster's charity campaign. */
|
|
19
|
+
Event: {
|
|
20
|
+
/** An ID that identifies the donation. The ID is unique across campaigns. */
|
|
21
|
+
id: string
|
|
22
|
+
/** An ID that identifies the charity campaign. */
|
|
23
|
+
campaign_id: string
|
|
24
|
+
/** An ID that identifies the broadcaster that's running the campaign. */
|
|
25
|
+
broadcaster_user_id: string
|
|
26
|
+
/** The broadcaster's login name. */
|
|
27
|
+
broadcaster_user_login: string
|
|
28
|
+
/** The broadcaster's display name. */
|
|
29
|
+
broadcaster_user_name: string
|
|
30
|
+
/** An ID that identifies the user that donated to the campaign. */
|
|
31
|
+
user_id: string
|
|
32
|
+
/** The user's login name. */
|
|
33
|
+
user_login: string
|
|
34
|
+
/** The user's display name. */
|
|
35
|
+
user_name: string
|
|
36
|
+
/** The charity's name. */
|
|
37
|
+
charity_name: string
|
|
38
|
+
/** A description of the charity. */
|
|
39
|
+
charity_description: string
|
|
40
|
+
/** A URL to an image of the charity's logo. The image's type is PNG and its size is 100px X 100px. */
|
|
41
|
+
charity_logo: string
|
|
42
|
+
/** A URL to the charity's website. */
|
|
43
|
+
charity_website: string
|
|
44
|
+
/** An object that contains the amount of money that the user donated. */
|
|
45
|
+
amount: {
|
|
46
|
+
/** The monetary amount. The amount is specified in the currency's minor unit. */
|
|
47
|
+
value: number
|
|
48
|
+
/**
|
|
49
|
+
* The number of decimal places used by the currency.
|
|
50
|
+
*
|
|
51
|
+
* value / 10^decimal_places
|
|
52
|
+
*/
|
|
53
|
+
decimal_places: number
|
|
54
|
+
/** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
|
|
55
|
+
currency: string
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}>
|
|
59
|
+
|
|
60
|
+
registerEvent("channel.charity_campaign.donate", {
|
|
61
|
+
scopes: ["channel:read:charity"],
|
|
62
|
+
subscriber: (userId) => ({
|
|
63
|
+
type: "channel.charity_campaign.donate",
|
|
64
|
+
version: "1",
|
|
65
|
+
condition: {
|
|
66
|
+
broadcaster_user_id: userId,
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
69
|
+
})
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type EventConfig, registerEvent } from "../events-helpers.ts"
|
|
2
|
+
|
|
3
|
+
declare module "../events-helpers.ts" {
|
|
4
|
+
interface EventConfigs {
|
|
5
|
+
"channel.charity_campaign.progress": ChannelCharityCampaignProgress
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Channel Charity Campaign Progress v1: When progress is made towards the campaign's goal or the broadcaster changes the fundraising goal. */
|
|
10
|
+
type ChannelCharityCampaignProgress = EventConfig<{
|
|
11
|
+
Type: "channel.charity_campaign.progress"
|
|
12
|
+
Version: "1"
|
|
13
|
+
/** The conditions to listen for when progress is made towards the campaign's goal or the broadcaster changes the fundraising goal. */
|
|
14
|
+
Condition: {
|
|
15
|
+
/** The ID of the broadcaster that you want to receive notifications about when their campaign makes progress or is updated. */
|
|
16
|
+
broadcaster_user_id: string
|
|
17
|
+
}
|
|
18
|
+
/** The event fired when progress is made towards the campaign's goal or the broadcaster changes the fundraising goal. */
|
|
19
|
+
Event: {
|
|
20
|
+
/** An ID that identifies the charity campaign. */
|
|
21
|
+
id: string
|
|
22
|
+
/** An ID that identifies the broadcaster that's running the campaign. */
|
|
23
|
+
broadcaster_id: string
|
|
24
|
+
/** The broadcaster's login name. */
|
|
25
|
+
broadcaster_login: string
|
|
26
|
+
/** The broadcaster's display name. */
|
|
27
|
+
broadcaster_name: string
|
|
28
|
+
/** The charity's name. */
|
|
29
|
+
charity_name: string
|
|
30
|
+
/** A description of the charity. */
|
|
31
|
+
charity_description: string
|
|
32
|
+
/** A URL to an image of the charity's logo. The image's type is PNG and its size is 100px X 100px. */
|
|
33
|
+
charity_logo: string
|
|
34
|
+
/** A URL to the charity's website. */
|
|
35
|
+
charity_website: string
|
|
36
|
+
/** An object that contains the current amount of donations that the campaign has received. */
|
|
37
|
+
current_amount: {
|
|
38
|
+
/** The monetary amount. The amount is specified in the currency's minor unit. */
|
|
39
|
+
value: number
|
|
40
|
+
/**
|
|
41
|
+
* The number of decimal places used by the currency.
|
|
42
|
+
*
|
|
43
|
+
* value / 10^decimal_places
|
|
44
|
+
*/
|
|
45
|
+
decimal_places: number
|
|
46
|
+
/** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
|
|
47
|
+
currency: string
|
|
48
|
+
}
|
|
49
|
+
/** An object that contains the campaign's target fundraising goal. */
|
|
50
|
+
target_amount: {
|
|
51
|
+
/** The monetary amount. The amount is specified in the currency's minor unit. */
|
|
52
|
+
value: number
|
|
53
|
+
/**
|
|
54
|
+
* The number of decimal places used by the currency.
|
|
55
|
+
*
|
|
56
|
+
* value / 10^decimal_places
|
|
57
|
+
*/
|
|
58
|
+
decimal_places: number
|
|
59
|
+
/** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
|
|
60
|
+
currency: string
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}>
|
|
64
|
+
|
|
65
|
+
registerEvent("channel.charity_campaign.progress", {
|
|
66
|
+
scopes: ["channel:read:charity"],
|
|
67
|
+
subscriber: (userId) => ({
|
|
68
|
+
type: "channel.charity_campaign.progress",
|
|
69
|
+
version: "1",
|
|
70
|
+
condition: {
|
|
71
|
+
broadcaster_user_id: userId,
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
})
|