From ed1e3a25bc0eef638e19c3865a13961e030db5ef Mon Sep 17 00:00:00 2001 From: EEKIM10 Date: Tue, 13 Sep 2022 14:00:27 +0100 Subject: [PATCH] Initial commit --- .idea/.gitignore | 3 +++ .idea/discord.xml | 7 +++++ .idea/inspectionProfiles/Project_Default.xml | 14 ++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 +++++ .idea/misc.xml | 4 +++ .idea/modules.xml | 8 ++++++ .idea/the-hi5-group.iml | 10 +++++++ main.py | 26 +++++++++++++++++++ 8 files changed, 78 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/discord.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/the-hi5-group.iml create mode 100644 main.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..d8e9561 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..90c1992 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..1d7b4a8 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..381052b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/the-hi5-group.iml b/.idea/the-hi5-group.iml new file mode 100644 index 0000000..74d515a --- /dev/null +++ b/.idea/the-hi5-group.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..7b02667 --- /dev/null +++ b/main.py @@ -0,0 +1,26 @@ +import discord +from discord.ext import commands +import config + + +bot = commands.Bot( + commands.when_mentioned_or("h!"), + debug_guilds=config.guilds +) + + +@bot.event +async def on_ready(): + print("Logged in as", bot.user) + + +@bot.slash_command() +async def ping(ctx: discord.ApplicationContext): + """Checks the bot's response time""" + gateway = round(ctx.bot.latency * 1000, 2) + return await ctx.respond( + f"\N{white heavy check mark} Pong! `{gateway}ms`." + ) + + +bot.run(config.token)