Node.js from version 7 has async/await syntactic sugar for handling promises and now in my code the following warning comes up quite often: (node:11057) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: Error: Can't set headers after they are sent. (node:11057) ...
Home/async-await
Discy Latest Questions
I am trying write discord bots using Python, I have come across and threw together this bot. import discord import asyncio import random client = discord.Client() inEmail = input("Email:") inPassword = input("Passwd:") async def background_loop(): await client.wait_until_ready() while not client.is_closed: ...