Update standalone_twitch_pubsub.py
This commit is contained in:
parent
463014aeb8
commit
801b0171e1
@ -30,6 +30,12 @@ class Twitch_Pubsub():
|
||||
uuid = self.pubsub.listen_whispers(user_id, self.callback_whisper)
|
||||
input('press ENTER to close...')
|
||||
|
||||
self.stop(uuid)
|
||||
|
||||
def stop(self, uuid):
|
||||
self.pubsub.unlisten(uuid)
|
||||
self.pubsub.stop()
|
||||
|
||||
def callback_whisper(self, uuid: UUID, data: dict) -> None:
|
||||
print('got callback for UUID ' + str(uuid))
|
||||
pprint(data)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user