format
This commit is contained in:
parent
5af8dddcc7
commit
7d11bf8adb
@ -213,7 +213,8 @@ export const twitchPlugin: ChannelPlugin<TwitchAccountConfig> = {
|
||||
}): ChannelAccountSnapshot => {
|
||||
const accountMap = cfg.channels?.twitch?.accounts ?? {};
|
||||
const resolvedAccountId =
|
||||
Object.entries(accountMap).find(([, value]) => value === account)?.[0] ?? DEFAULT_ACCOUNT_ID;
|
||||
Object.entries(accountMap).find(([, value]) => value === account)?.[0] ??
|
||||
DEFAULT_ACCOUNT_ID;
|
||||
return {
|
||||
accountId: DEFAULT_ACCOUNT_ID,
|
||||
enabled: account?.enabled !== false,
|
||||
|
||||
@ -230,7 +230,10 @@ export class TwitchClientManager {
|
||||
* Set a message handler for an account
|
||||
* @returns A function that removes the handler when called
|
||||
*/
|
||||
onMessage(account: TwitchAccountConfig, handler: (message: TwitchChatMessage) => void): () => void {
|
||||
onMessage(
|
||||
account: TwitchAccountConfig,
|
||||
handler: (message: TwitchChatMessage) => void,
|
||||
): () => void {
|
||||
const key = this.getAccountKey(account);
|
||||
this.messageHandlers.set(key, handler);
|
||||
return () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user