Skip to content

Commit

Permalink
fix(IRC): open up IRC client initializer
Browse files Browse the repository at this point in the history
This addresses #10 and allows connecting to chat independently of using the API.
  • Loading branch information
kevinrpb committed Sep 3, 2024
1 parent 32cab9b commit e7a8458
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Sources/Twitch/IRC/TwitchIRCClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import TwitchIRC
import FoundationNetworking
#endif

public class TwitchIRCClient {
public actor TwitchIRCClient {
private let connectionPool: IRCConnectionPool
private var handlers = [IRCMessageHandler]()

internal init(with authentication: TwitchCredentials? = nil, urlSession: URLSession)
async throws
{
public init(
with authentication: TwitchCredentials? = nil,
urlSession: URLSession = URLSession(configuration: .default)
) async throws {
self.connectionPool = IRCConnectionPool(
with: authentication,
urlSession: urlSession
Expand Down

0 comments on commit e7a8458

Please sign in to comment.