commit ed1e3a25bc0eef638e19c3865a13961e030db5ef Author: EEKIM10 Date: Tue Sep 13 14:00:27 2022 +0100 Initial commit 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)