@tool extends TwitchData # CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY. class_name TwitchSendChatMessage ## ## #/components/schemas/SendChatMessageBody class Body extends TwitchData: ## The ID of the broadcaster whose chat room the message will be sent to. @export var broadcaster_id: String: set(val): broadcaster_id = val track_data(&"broadcaster_id", val) ## The ID of the user sending the message. This ID must match the user ID in the user access token. @export var sender_id: String: set(val): sender_id = val track_data(&"sender_id", val) ## The message to send. The message is limited to a maximum of 500 characters. Chat messages can also include emoticons. To include emoticons, use the name of the emote. The names are case sensitive. Don’t include colons around the name (e.g., :bleedPurple:). If Twitch recognizes the name, Twitch converts the name to the emote before writing the chat message to the chat room @export var message: String: set(val): message = val track_data(&"message", val) ## The ID of the chat message being replied to. @export var reply_parent_message_id: String: set(val): reply_parent_message_id = val track_data(&"reply_parent_message_id", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_broadcaster_id: String, _sender_id: String, _message: String) -> Body: var body: Body = Body.new() body.broadcaster_id = _broadcaster_id body.sender_id = _sender_id body.message = _message return body static func from_json(d: Dictionary) -> Body: var result: Body = Body.new() if d.get("broadcaster_id", null) != null: result.broadcaster_id = d["broadcaster_id"] if d.get("sender_id", null) != null: result.sender_id = d["sender_id"] if d.get("message", null) != null: result.message = d["message"] if d.get("reply_parent_message_id", null) != null: result.reply_parent_message_id = d["reply_parent_message_id"] return result ## ## #/components/schemas/SendChatMessageResponse class Response extends TwitchData: ## @export var data: Array[ResponseData]: set(val): data = val track_data(&"data", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_data: Array[ResponseData]) -> Response: var response: Response = Response.new() response.data = _data return response static func from_json(d: Dictionary) -> Response: var result: Response = Response.new() if d.get("data", null) != null: for value in d["data"]: result.data.append(ResponseData.from_json(value)) return result ## ## #/components/schemas/SendChatMessageResponse/Data class ResponseData extends TwitchData: ## The message id for the message that was sent. @export var message_id: String: set(val): message_id = val track_data(&"message_id", val) ## If the message passed all checks and was sent. @export var is_sent: bool: set(val): is_sent = val track_data(&"is_sent", val) ## The reason the message was dropped, if any. @export var drop_reason: ResponseDropReason: set(val): drop_reason = val track_data(&"drop_reason", val) ## Constructor with all required fields. static func create(_message_id: String, _is_sent: bool) -> ResponseData: var response_data: ResponseData = ResponseData.new() response_data.message_id = _message_id response_data.is_sent = _is_sent return response_data static func from_json(d: Dictionary) -> ResponseData: var result: ResponseData = ResponseData.new() if d.get("message_id", null) != null: result.message_id = d["message_id"] if d.get("is_sent", null) != null: result.is_sent = d["is_sent"] if d.get("drop_reason", null) != null: result.drop_reason = ResponseDropReason.from_json(d["drop_reason"]) return result ## The reason the message was dropped, if any. ## #/components/schemas/SendChatMessageResponse/Data/DropReason class ResponseDropReason extends TwitchData: ## Code for why the message was dropped. @export var code: String: set(val): code = val track_data(&"code", val) ## Message for why the message was dropped. @export var message: String: set(val): message = val track_data(&"message", val) ## Constructor with all required fields. static func create(_code: String, _message: String) -> ResponseDropReason: var response_drop_reason: ResponseDropReason = ResponseDropReason.new() response_drop_reason.code = _code response_drop_reason.message = _message return response_drop_reason static func from_json(d: Dictionary) -> ResponseDropReason: var result: ResponseDropReason = ResponseDropReason.new() if d.get("code", null) != null: result.code = d["code"] if d.get("message", null) != null: result.message = d["message"] return result