I’m trying to build a streaming stock scanner that will post alerts to a Discord channel.
I’ve tested my scanner without the connection to Discord and it works just fine…prints out results and no errors
My current hurdle is that in order to connect to Discord I have to use the following Async method:
async def on_ready():
print(‘Bot is ready and scanning…’)
When the run method (my scanner logic) fires, it fails on the websocket connection with the error “The event loop is already running”.
I can definitely share more snippets and pseudocode if need be, but I thought just starting the conversation would be good…I’m not entirely sure this is something that can be accomplished with Discord.py and Polygon streaming.
Has anyone tried this type of thing or have any tips on what to go research next?