feat(plugins): minimal account API (#6554)

Co-authored-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
This commit is contained in:
nerix
2025-12-05 15:56:51 +01:00
committed by GitHub
parent c4ed716c33
commit c67953d14f
10 changed files with 266 additions and 0 deletions
+32
View File
@@ -54,6 +54,38 @@ c2.ChannelType = {
-- End src/common/Channel.hpp
-- Begin src/controllers/plugins/api/Accounts.hpp
---@class c2.TwitchAccount
c2.TwitchAccount = {}
--- Returns true if the account this object points to is valid.
--- If the object expired, returns false
---
---@return boolean success
function c2.TwitchAccount:is_valid() end
---@return string user_login The (login) name of the account
function c2.TwitchAccount:login() end
---@return string user_id The Twitch user ID of the account
function c2.TwitchAccount:id() end
---@return string? color Color in chat of this account. `nil` if not yet known
function c2.TwitchAccount:color() end
---@return boolean is_anon `true` if this account is an anonymous account (no associated Twitch user)
function c2.TwitchAccount:is_anon() end
---@return string str
function c2.TwitchAccount:__tostring() end
---Gets the currently logged in Twitch account. This account might be an anonymous one (see `is_anon`).
---@return c2.TwitchAccount account
function c2.current_account() end
-- End src/controllers/plugins/api/Accounts.hpp
-- Begin src/controllers/plugins/api/ChannelRef.hpp
-- Begin src/providers/twitch/TwitchChannel.hpp