mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Initial commit
This commit is contained in:
commit
ed1e3a25bc
8 changed files with 78 additions and 0 deletions
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
7
.idea/discord.xml
Normal file
7
.idea/discord.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
14
.idea/inspectionProfiles/Project_Default.xml
Normal file
14
.idea/inspectionProfiles/Project_Default.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="pycord" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (the-hi5-group)" project-jdk-type="Python SDK" />
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/the-hi5-group.iml" filepath="$PROJECT_DIR$/.idea/the-hi5-group.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
10
.idea/the-hi5-group.iml
Normal file
10
.idea/the-hi5-group.iml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
26
main.py
Normal file
26
main.py
Normal file
|
@ -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)
|
Loading…
Reference in a new issue