feat(plugins): add display name change event to Channel (#6594)

Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
This commit is contained in:
Nerixyz
2026-01-29 18:25:39 +01:00
committed by GitHub
parent 60ecf1a8d7
commit a869cd4bd1
19 changed files with 610 additions and 0 deletions
+37
View File
@@ -244,6 +244,12 @@ function c2.Channel:is_vip() end
---@return string
function c2.Channel:__tostring() end
--- Callback when the channel display name changes.
---
---@param cb fun()
---@return c2.ConnectionHandle hdl
function c2.Channel:on_display_name_changed(cb) end
--- Finds a channel by name.
--- Misc channels are marked as Twitch:
--- - /whispers
@@ -264,6 +270,37 @@ function c2.Channel.by_twitch_id(id) end
-- End src/controllers/plugins/api/ChannelRef.hpp
-- Begin src/controllers/plugins/api/ConnectionHandle.hpp
---@class c2.ConnectionHandle
---This type represents a handle to a registration of a callback for an event handler.
---Conceptually, the event has a _connection_ to the callback/handler.
---This handle can be used to modify that connection.
---It does not automatically disconnect the connection when it's destroyed (in `__gc`) -
---`disconnect()` has to be called manually.
c2.ConnectionHandle = {}
---Disconnect the signal
function c2.ConnectionHandle:disconnect() end
---Block events on this connection
function c2.ConnectionHandle:block() end
---Unblock events on this connection
function c2.ConnectionHandle:unblock() end
---Is this connection currently blocked?
---@return boolean is_blocked
function c2.ConnectionHandle:is_blocked() end
---Is this connection still connected?
---@return boolean is_connected
function c2.ConnectionHandle:is_connected() end
-- End src/controllers/plugins/api/ConnectionHandle.hpp
-- Begin src/controllers/plugins/api/HTTPResponse.hpp
---@class c2.HTTPResponse