Added optional uvloop runtime

This commit is contained in:
2021-10-31 11:21:30 +01:00
parent bcf3d957a8
commit 9338f0a3c3
3 changed files with 41 additions and 1 deletions
+8
View File
@@ -69,6 +69,14 @@ class ChristmasBot(commands.Bot):
if __name__ == "__main__":
try:
import uvloop
uvloop.install()
print("Succesfully initialized uvloop")
except ModuleNotFoundError:
pass
config = json.load(open("config.json", "r", encoding="utf-8"))
token = config.pop("token")
bot = ChristmasBot(config)