Move plugins to Sol (#5622)
Co-authored-by: Nerixyz <nerixdev@outlook.de> Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
+57
-32
@@ -5,14 +5,23 @@
|
||||
-- Add the folder this file is in to "Lua.workspace.library".
|
||||
|
||||
c2 = {}
|
||||
---@alias c2.LogLevel integer
|
||||
---@type { Debug: c2.LogLevel, Info: c2.LogLevel, Warning: c2.LogLevel, Critical: c2.LogLevel }
|
||||
---@alias c2.LogLevel.Debug "c2.LogLevel.Debug"
|
||||
---@alias c2.LogLevel.Info "c2.LogLevel.Info"
|
||||
---@alias c2.LogLevel.Warning "c2.LogLevel.Warning"
|
||||
---@alias c2.LogLevel.Critical "c2.LogLevel.Critical"
|
||||
---@alias c2.LogLevel c2.LogLevel.Debug|c2.LogLevel.Info|c2.LogLevel.Warning|c2.LogLevel.Critical
|
||||
---@type { Debug: c2.LogLevel.Debug, Info: c2.LogLevel.Info, Warning: c2.LogLevel.Warning, Critical: c2.LogLevel.Critical }
|
||||
c2.LogLevel = {}
|
||||
|
||||
---@alias c2.EventType integer
|
||||
---@type { CompletionRequested: c2.EventType }
|
||||
-- Begin src/controllers/plugins/api/EventType.hpp
|
||||
|
||||
---@alias c2.EventType.CompletionRequested "c2.EventType.CompletionRequested"
|
||||
---@alias c2.EventType c2.EventType.CompletionRequested
|
||||
---@type { CompletionRequested: c2.EventType.CompletionRequested }
|
||||
c2.EventType = {}
|
||||
|
||||
-- End src/controllers/plugins/api/EventType.hpp
|
||||
|
||||
---@class CommandContext
|
||||
---@field words string[] The words typed when executing the command. For example `/foo bar baz` will result in `{"/foo", "bar", "baz"}`.
|
||||
---@field channel c2.Channel The channel the command was executed in.
|
||||
@@ -29,19 +38,40 @@ c2.EventType = {}
|
||||
|
||||
-- Begin src/common/Channel.hpp
|
||||
|
||||
---@alias c2.ChannelType integer
|
||||
---@type { None: c2.ChannelType, Direct: c2.ChannelType, Twitch: c2.ChannelType, TwitchWhispers: c2.ChannelType, TwitchWatching: c2.ChannelType, TwitchMentions: c2.ChannelType, TwitchLive: c2.ChannelType, TwitchAutomod: c2.ChannelType, TwitchEnd: c2.ChannelType, Irc: c2.ChannelType, Misc: c2.ChannelType }
|
||||
---@alias c2.ChannelType.None "c2.ChannelType.None"
|
||||
---@alias c2.ChannelType.Direct "c2.ChannelType.Direct"
|
||||
---@alias c2.ChannelType.Twitch "c2.ChannelType.Twitch"
|
||||
---@alias c2.ChannelType.TwitchWhispers "c2.ChannelType.TwitchWhispers"
|
||||
---@alias c2.ChannelType.TwitchWatching "c2.ChannelType.TwitchWatching"
|
||||
---@alias c2.ChannelType.TwitchMentions "c2.ChannelType.TwitchMentions"
|
||||
---@alias c2.ChannelType.TwitchLive "c2.ChannelType.TwitchLive"
|
||||
---@alias c2.ChannelType.TwitchAutomod "c2.ChannelType.TwitchAutomod"
|
||||
---@alias c2.ChannelType.TwitchEnd "c2.ChannelType.TwitchEnd"
|
||||
---@alias c2.ChannelType.Misc "c2.ChannelType.Misc"
|
||||
---@alias c2.ChannelType c2.ChannelType.None|c2.ChannelType.Direct|c2.ChannelType.Twitch|c2.ChannelType.TwitchWhispers|c2.ChannelType.TwitchWatching|c2.ChannelType.TwitchMentions|c2.ChannelType.TwitchLive|c2.ChannelType.TwitchAutomod|c2.ChannelType.TwitchEnd|c2.ChannelType.Misc
|
||||
---@type { None: c2.ChannelType.None, Direct: c2.ChannelType.Direct, Twitch: c2.ChannelType.Twitch, TwitchWhispers: c2.ChannelType.TwitchWhispers, TwitchWatching: c2.ChannelType.TwitchWatching, TwitchMentions: c2.ChannelType.TwitchMentions, TwitchLive: c2.ChannelType.TwitchLive, TwitchAutomod: c2.ChannelType.TwitchAutomod, TwitchEnd: c2.ChannelType.TwitchEnd, Misc: c2.ChannelType.Misc }
|
||||
c2.ChannelType = {}
|
||||
|
||||
-- End src/common/Channel.hpp
|
||||
|
||||
-- Begin src/controllers/plugins/api/ChannelRef.hpp
|
||||
|
||||
---@alias c2.Platform integer
|
||||
--- This enum describes a platform for the purpose of searching for a channel.
|
||||
--- Currently only Twitch is supported because identifying IRC channels is tricky.
|
||||
---@type { Twitch: c2.Platform }
|
||||
c2.Platform = {}
|
||||
-- Begin src/providers/twitch/TwitchChannel.hpp
|
||||
|
||||
---@class StreamStatus
|
||||
---@field live boolean
|
||||
---@field viewer_count number
|
||||
---@field title string Stream title or last stream title
|
||||
---@field game_name string
|
||||
---@field game_id string
|
||||
---@field uptime number Seconds since the stream started.
|
||||
|
||||
---@class RoomModes
|
||||
---@field subscriber_only boolean
|
||||
---@field unique_chat boolean You might know this as r9kbeta or robot9000.
|
||||
---@field emotes_only boolean Whether or not text is allowed in messages. Note that "emotes" here only means Twitch emotes, not Unicode emoji, nor 3rd party text-based emotes
|
||||
|
||||
-- End src/providers/twitch/TwitchChannel.hpp
|
||||
|
||||
---@class c2.Channel
|
||||
c2.Channel = {}
|
||||
@@ -72,7 +102,7 @@ function c2.Channel:get_display_name() end
|
||||
--- Note that this does not execute client-commands.
|
||||
---
|
||||
---@param message string
|
||||
---@param execute_commands boolean Should commands be run on the text?
|
||||
---@param execute_commands? boolean Should commands be run on the text?
|
||||
function c2.Channel:send_message(message, execute_commands) end
|
||||
|
||||
--- Adds a system message client-side
|
||||
@@ -131,9 +161,8 @@ function c2.Channel:__tostring() end
|
||||
--- - /automod
|
||||
---
|
||||
---@param name string Which channel are you looking for?
|
||||
---@param platform c2.Platform Where to search for the channel?
|
||||
---@return c2.Channel?
|
||||
function c2.Channel.by_name(name, platform) end
|
||||
function c2.Channel.by_name(name) end
|
||||
|
||||
--- Finds a channel by the Twitch user ID of its owner.
|
||||
---
|
||||
@@ -141,21 +170,6 @@ function c2.Channel.by_name(name, platform) end
|
||||
---@return c2.Channel?
|
||||
function c2.Channel.by_twitch_id(id) end
|
||||
|
||||
---@class RoomModes
|
||||
---@field unique_chat boolean You might know this as r9kbeta or robot9000.
|
||||
---@field subscriber_only boolean
|
||||
---@field emotes_only boolean Whether or not text is allowed in messages. Note that "emotes" here only means Twitch emotes, not Unicode emoji, nor 3rd party text-based emotes
|
||||
---@field follower_only number? Time in minutes you need to follow to chat or nil.
|
||||
---@field slow_mode number? Time in seconds you need to wait before sending messages or nil.
|
||||
|
||||
---@class StreamStatus
|
||||
---@field live boolean
|
||||
---@field viewer_count number
|
||||
---@field uptime number Seconds since the stream started.
|
||||
---@field title string Stream title or last stream title
|
||||
---@field game_name string
|
||||
---@field game_id string
|
||||
|
||||
-- End src/controllers/plugins/api/ChannelRef.hpp
|
||||
|
||||
-- Begin src/controllers/plugins/api/HTTPResponse.hpp
|
||||
@@ -176,6 +190,9 @@ function HTTPResponse:status() end
|
||||
---
|
||||
function HTTPResponse:error() end
|
||||
|
||||
---@return string
|
||||
function HTTPResponse:__tostring() end
|
||||
|
||||
-- End src/controllers/plugins/api/HTTPResponse.hpp
|
||||
|
||||
-- Begin src/controllers/plugins/api/HTTPRequest.hpp
|
||||
@@ -219,6 +236,9 @@ function HTTPRequest:set_header(name, value) end
|
||||
---
|
||||
function HTTPRequest:execute() end
|
||||
|
||||
---@return string
|
||||
function HTTPRequest:__tostring() end
|
||||
|
||||
--- Creates a new HTTPRequest
|
||||
---
|
||||
---@param method HTTPMethod Method to use
|
||||
@@ -230,8 +250,13 @@ function HTTPRequest.create(method, url) end
|
||||
|
||||
-- Begin src/common/network/NetworkCommon.hpp
|
||||
|
||||
---@alias HTTPMethod integer
|
||||
---@type { Get: HTTPMethod, Post: HTTPMethod, Put: HTTPMethod, Delete: HTTPMethod, Patch: HTTPMethod }
|
||||
---@alias HTTPMethod.Get "HTTPMethod.Get"
|
||||
---@alias HTTPMethod.Post "HTTPMethod.Post"
|
||||
---@alias HTTPMethod.Put "HTTPMethod.Put"
|
||||
---@alias HTTPMethod.Delete "HTTPMethod.Delete"
|
||||
---@alias HTTPMethod.Patch "HTTPMethod.Patch"
|
||||
---@alias HTTPMethod HTTPMethod.Get|HTTPMethod.Post|HTTPMethod.Put|HTTPMethod.Delete|HTTPMethod.Patch
|
||||
---@type { Get: HTTPMethod.Get, Post: HTTPMethod.Post, Put: HTTPMethod.Put, Delete: HTTPMethod.Delete, Patch: HTTPMethod.Patch }
|
||||
HTTPMethod = {}
|
||||
|
||||
-- End src/common/network/NetworkCommon.hpp
|
||||
@@ -245,7 +270,7 @@ function c2.register_command(name, handler) end
|
||||
|
||||
--- Registers a callback to be invoked when completions for a term are requested.
|
||||
---
|
||||
---@param type "CompletionRequested"
|
||||
---@param type c2.EventType.CompletionRequested
|
||||
---@param func fun(event: CompletionEvent): CompletionList The callback to be invoked.
|
||||
function c2.register_callback(type, func) end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user