imayhaveborkedit / discord-ext-voice-recv

Voice receive extension package for discord.py
https://pypi.org/project/discord-ext-voice-recv/
MIT License
117 stars 18 forks source link

async listening? #11

Closed gutbash closed 7 months ago

gutbash commented 7 months ago

?

imayhaveborkedit commented 7 months ago

?

ThatOtherAndrew commented 7 months ago

?

gutbash commented 7 months ago

how do i make the on_message handler async? i need to do some async stuff in there

imayhaveborkedit commented 7 months ago

This extension doesn't add anything called "on_message". Refer to the readme. Everything is listed there. If you need to use something async in a sync function, use one of the usual asyncio mechanisms for it, like run_coroutine_threadsafe.

gutbash commented 7 months ago

oh sorry how about AudioSink.listener()? just use asyncio mechanism?

imayhaveborkedit commented 7 months ago

https://docs.python.org/3/library/asyncio-task.html#scheduling-from-other-threads