Skip to content

Tag: python-asyncio

If I use a helping function for a discord.py command, should I use await to call my helping function or just transfer control to my async helper

I have a command that works to send multiple type of messages that follow the same structure but I am using a helping function to send the message. For simplicity, my code looks similar to this: Option 1: Option 2 is making every function async and calling helper with await. It is my first time creating a dis…

websocket await close vs await wait_closed

I’m using the websockets package on python and I’m opening a connection as a client, but NOT in a block context like this: I’m opening the connection like this: The thing is that I don’t under stand what is the right way to close the connection. The document explains here about await c…