Add WebSocket announce listener to both IRC bot plugins
- Limnoria: add wsUrl, announceChannel config; __init__, die, _ws_listener - Sopel: add ws_url, announce_channel config; setup/shutdown, _ws_listener - Feature parity: subscribe to WS, receive announce msgs, send to IRC channel - Deferred websocket-client import to avoid load failure if not installed Made-with: Cursor
This commit is contained in:
@@ -43,3 +43,21 @@ conf.registerGlobalValue(
|
||||
"""IANA timezone for displaying dates in IRC (e.g. America/New_York, America/Chicago).""",
|
||||
),
|
||||
)
|
||||
|
||||
conf.registerGlobalValue(
|
||||
NtrPlaylist,
|
||||
"wsUrl",
|
||||
registry.String(
|
||||
"ws://127.0.0.1:8000/ws/announce",
|
||||
"""WebSocket URL for receiving announce commands from the dashboard.""",
|
||||
),
|
||||
)
|
||||
|
||||
conf.registerGlobalValue(
|
||||
NtrPlaylist,
|
||||
"announceChannel",
|
||||
registry.String(
|
||||
"#sewerchat",
|
||||
"""IRC channel to send announce messages to.""",
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user