From 94553b602e53ea41b805d5eadab16a65b0efe178 Mon Sep 17 00:00:00 2001 From: kku Date: Sun, 29 Dec 2024 16:27:58 +0100 Subject: [PATCH] Fixed imports in examples --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c4b21b4..b77c3c9 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ pip install libbot[pycord,speed] ### Pyrogram ```python +import sys + from libbot.pyrogram.classes import PyroClient @@ -47,7 +49,7 @@ def main(): except KeyboardInterrupt: print("Shutting down...") finally: - exit() + sys.exit() if __name__ == "__main__": @@ -57,6 +59,9 @@ if __name__ == "__main__": ### Pycord ```python +import asyncio +from asyncio import AbstractEventLoop + from discord import Intents from libbot.utils import config_get from libbot.pycord.classes import PycordBot @@ -76,7 +81,7 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() + loop: AbstractEventLoop = asyncio.get_event_loop() loop.run_until_complete(main()) ```