panini icon indicating copy to clipboard operation
panini copied to clipboard

Add possibility not to use asyncio.iscoroutinefunction in middlewares, but still support sync def

Open danylott opened this issue 4 years ago • 1 comments

Not to overuse:

if asyncio.iscoroutinefunction(callback):
  return await callback(msg)
else:
  return callback(msg)

danylott avatar Aug 02 '21 11:08 danylott

Indeed it's confusing I'm thinking to deprecate sync functions

artas728 avatar Feb 07 '22 09:02 artas728