Overview
Properties
Methods
action(text)
asyncSends an action (/me) to the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
text | string | none | The text to send. |
announce(text, color)
asyncSends an announcement to the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
text | string | none | The text to send. | |
color | ChatAnnouncementColor Aliased type: The color used to highlight an announcement. Aliased type: "blue" | "green" | "orange" | "purple" | "primary" | none | The color to send the announcement in. If not passed, uses the default channel color. |
ban(reason)
asyncBans the user who sent the message from the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
reason | string | none | The reason for the ban. |
enableFollowersOnly(minFollowTime)
asyncEnables followers-only mode in the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
minFollowTime | number | 0 | The time (in minutes) a user needs to be following before being able to send messages. |
enableSlow(delayBetweenMessages)
asyncEnables slow mode in the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
delayBetweenMessages | number | 30 | The time (in seconds) a user needs to wait between messages. |
purge(reason)
asyncRemoves all messages of the user from the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
reason | string | '' | The reason for the purge. |
reply(text)
asyncSends a reply to the chat message to the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
text | string | none | The text to send. |
runCommercial(length)
asyncRuns a commercial break on the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
length | CommercialLength The possible lengths of a channel commercial. Aliased type: 30 | 60 | 90 | 120 | 150 | 180 | 30 | The duration of the commercial break. |
say(text)
asyncSends a regular chat message to the channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
text | string | none | The text to send. |
timeout(duration, reason)
asyncTimes out then user in the channel and removes all their messages.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
duration | number | 30 | The time (in seconds) until the user can send messages again. Defaults to 1 minute. | |
reason | string | '' | The reason for the timeout. |