diff --git a/main.py b/main.py index 7f828c0..f98767f 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,7 @@ from discord import app_commands import psutil import time from other.ikavoidping import get_api_ping +from other.almteshdotnetping import get_api_ping as get_almtesh_ping dotenv.load_dotenv() TOKEN = dotenv.get_key(".env", "DISCORD_TOKEN") diff --git a/other/almteshdotnetping b/other/almteshdotnetping new file mode 100644 index 0000000..305106c --- /dev/null +++ b/other/almteshdotnetping @@ -0,0 +1,11 @@ +import requests +import time + +url = "https://almtesh.net/" + +async def get_api_ping(): + start_time = time.time() + requests.get(url) + end_time = time.time() + ping = (end_time - start_time) * 1000 + return ping \ No newline at end of file