21 lines
434 B
Python
21 lines
434 B
Python
# test_irc.py
|
|
import asyncio
|
|
import sys
|
|
sys.path.insert(0, '.')
|
|
|
|
from services.irc_service import TwitchIRCClient
|
|
|
|
async def test():
|
|
print("Testing IRC connection...")
|
|
|
|
irc = TwitchIRCClient("jentteno", "*")
|
|
|
|
async def on_url(url, user):
|
|
print(f"URL: {url} from {user}")
|
|
|
|
print("Connecting...")
|
|
await irc.listen_for_messages(on_url, duration=60)
|
|
await irc.disconnect()
|
|
|
|
asyncio.run(test())
|