Update standalone_twitch_pubsub.py

This commit is contained in:
Alex Orid 2021-04-23 05:37:53 -04:00
parent 463014aeb8
commit 801b0171e1

View File

@ -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)