Update chatterino.d.ts to match plugin-meta.lua (#5792)
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
trailingComma: es5
|
trailingComma: es5
|
||||||
endOfLine: auto
|
endOfLine: auto
|
||||||
overrides:
|
overrides:
|
||||||
|
- files: "*.ts"
|
||||||
|
options:
|
||||||
|
tabWidth: 4
|
||||||
- files: "*.md"
|
- files: "*.md"
|
||||||
options:
|
options:
|
||||||
proseWrap: preserve
|
proseWrap: preserve
|
||||||
|
|||||||
Vendored
+7
-8
@@ -8,13 +8,10 @@ declare module c2 {
|
|||||||
Critical,
|
Critical,
|
||||||
}
|
}
|
||||||
class CommandContext {
|
class CommandContext {
|
||||||
words: String[];
|
words: string[];
|
||||||
channel: Channel;
|
channel: Channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Platform {
|
|
||||||
Twitch,
|
|
||||||
}
|
|
||||||
enum ChannelType {
|
enum ChannelType {
|
||||||
None,
|
None,
|
||||||
Direct,
|
Direct,
|
||||||
@@ -24,7 +21,6 @@ declare module c2 {
|
|||||||
TwitchMentions,
|
TwitchMentions,
|
||||||
TwitchLive,
|
TwitchLive,
|
||||||
TwitchAutomod,
|
TwitchAutomod,
|
||||||
Irc,
|
|
||||||
Misc,
|
Misc,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +51,10 @@ declare module c2 {
|
|||||||
get_name(): string;
|
get_name(): string;
|
||||||
get_type(): ChannelType;
|
get_type(): ChannelType;
|
||||||
get_display_name(): string;
|
get_display_name(): string;
|
||||||
|
|
||||||
send_message(message: string, execute_commands: boolean): void;
|
send_message(message: string, execute_commands: boolean): void;
|
||||||
|
send_message(message: string): void;
|
||||||
|
|
||||||
add_system_message(message: string): void;
|
add_system_message(message: string): void;
|
||||||
|
|
||||||
is_twitch_channel(): boolean;
|
is_twitch_channel(): boolean;
|
||||||
@@ -67,7 +66,7 @@ declare module c2 {
|
|||||||
is_mod(): boolean;
|
is_mod(): boolean;
|
||||||
is_vip(): boolean;
|
is_vip(): boolean;
|
||||||
|
|
||||||
static by_name(name: string, platform: Platform): null | Channel;
|
static by_name(name: string): null | Channel;
|
||||||
static by_twitch_id(id: string): null | Channel;
|
static by_twitch_id(id: string): null | Channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +102,7 @@ declare module c2 {
|
|||||||
|
|
||||||
function log(level: LogLevel, ...data: any[]): void;
|
function log(level: LogLevel, ...data: any[]): void;
|
||||||
function register_command(
|
function register_command(
|
||||||
name: String,
|
name: string,
|
||||||
handler: (ctx: CommandContext) => void
|
handler: (ctx: CommandContext) => void
|
||||||
): boolean;
|
): boolean;
|
||||||
|
|
||||||
@@ -115,7 +114,7 @@ declare module c2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class CompletionList {
|
class CompletionList {
|
||||||
values: String[];
|
values: string[];
|
||||||
hide_others: boolean;
|
hide_others: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ c2.ChannelType = {
|
|||||||
---@field subscriber_only boolean
|
---@field subscriber_only boolean
|
||||||
---@field unique_chat boolean You might know this as r9kbeta or robot9000.
|
---@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
|
---@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.
|
||||||
|
|
||||||
-- End src/providers/twitch/TwitchChannel.hpp
|
-- End src/providers/twitch/TwitchChannel.hpp
|
||||||
|
|
||||||
|
|||||||
@@ -115,24 +115,26 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool emoteOnly = false;
|
bool emoteOnly = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @lua@field follower_only number? Time in minutes you need to follow to chat or nil.
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Number of minutes required for users to be followed before typing in chat
|
* @brief Number of minutes required for users to be followed before typing in chat
|
||||||
*
|
*
|
||||||
* Special cases:
|
* Special cases:
|
||||||
* -1 = follower mode off
|
* -1 = follower mode off
|
||||||
* 0 = follower mode on, no time requirement
|
* 0 = follower mode on, no time requirement
|
||||||
*
|
*/
|
||||||
* @lua@field follower_only number? Time in minutes you need to follow to chat or nil.
|
|
||||||
**/
|
|
||||||
int followerOnly = -1;
|
int followerOnly = -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @lua@field slow_mode number? Time in seconds you need to wait before sending messages or nil.
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Number of seconds required to wait before typing emotes
|
* @brief Number of seconds required to wait before typing emotes
|
||||||
*
|
*
|
||||||
* 0 = slow mode off
|
* 0 = slow mode off
|
||||||
*
|
*/
|
||||||
* @lua@field slow_mode number? Time in seconds you need to wait before sending messages or nil.
|
|
||||||
**/
|
|
||||||
int slowMode = 0;
|
int slowMode = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user