Closed 2Cubed closed 6 years ago
Command responses using generators. Requires asynchronous generators in Python 3.6 and #254.
async def remind(self, seconds: r'\d+', *message): yield f"Reminder set for {seconds}s from now." await asyncio.sleep(int(seconds)) yield "REMINDER: " + ' '.join(message)
Command responses using generators. Requires asynchronous generators in Python 3.6 and #254.