50 lines
1.4 KiB
GDScript3
50 lines
1.4 KiB
GDScript3
|
|
@tool
|
|||
|
|
extends TwitchData
|
|||
|
|
|
|||
|
|
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
|
|||
|
|
|
|||
|
|
class_name TwitchSendChatAnnouncement
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
##
|
|||
|
|
## #/components/schemas/SendChatAnnouncementBody
|
|||
|
|
class Body extends TwitchData:
|
|||
|
|
|
|||
|
|
## The announcement to make in the broadcaster’s chat room. Announcements are limited to a maximum of 500 characters; announcements longer than 500 characters are truncated.
|
|||
|
|
@export var message: String:
|
|||
|
|
set(val):
|
|||
|
|
message = val
|
|||
|
|
track_data(&"message", val)
|
|||
|
|
|
|||
|
|
## The color used to highlight the announcement. Possible case-sensitive values are:
|
|||
|
|
##
|
|||
|
|
## * blue
|
|||
|
|
## * green
|
|||
|
|
## * orange
|
|||
|
|
## * purple
|
|||
|
|
## * primary (default)
|
|||
|
|
##
|
|||
|
|
## If `color` is set to _primary_ or is not set, the channel’s accent color is used to highlight the announcement (see **Profile Accent Color** under [profile settings](https://www.twitch.tv/settings/profile), **Channel and Videos**, and **Brand**).
|
|||
|
|
@export var color: String:
|
|||
|
|
set(val):
|
|||
|
|
color = val
|
|||
|
|
track_data(&"color", val)
|
|||
|
|
var response: BufferedHTTPClient.ResponseData
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create(_message: String) -> Body:
|
|||
|
|
var body: Body = Body.new()
|
|||
|
|
body.message = _message
|
|||
|
|
return body
|
|||
|
|
|
|||
|
|
|
|||
|
|
static func from_json(d: Dictionary) -> Body:
|
|||
|
|
var result: Body = Body.new()
|
|||
|
|
if d.get("message", null) != null:
|
|||
|
|
result.message = d["message"]
|
|||
|
|
if d.get("color", null) != null:
|
|||
|
|
result.color = d["color"]
|
|||
|
|
return result
|
|||
|
|
|