NOTE 📝:
This is a Discord bot built with Discord.py, as a template for slash commands and already a ping command. This project may not be completely finished yet, but I don't plan to add more at this moment, because I want it more as a template for others.
- Slash Command sync: Sync slash commands globally or in specific guilds.
- Ping Command: Check the bot's latency.
To use this bot, follow these steps:
- set up a bot on https://discord.com/developers/applications
- get your bot token and put the token in the token.txt
- Invite the bot to your Discord server
- Run the bot by putting your token in the
"token.txt"
, no other characters
- Description: Sync slash commands globally or in specific guilds.
- Usage:
.sync [guilds] [spec]
guilds
: Optional list of guild IDs to sync commands to.spec
: Optional argument to specify syncing method:"guild"
,"global"
, or"clear"
.
- Permissions Required: Bot owner
- Description: Check the bot's latency.
- Usage:
/ping
-
Clone the repository:
git clone https://github.com/TrapstarJannik/Discord-Slash-Command.git
cd Discord-Slash-Command
-
Run the bot:
python main.py
Important
You need to put your token in the token.txt
or you will get an error!
- The bot's prefix is set to
.
by default. You can change it in themain.py
file. - add your discord bot token in the
token.txt
by replacing the first line.
Tip
The time is still in a 24 hour format, I marked it in the code so you can change it if you want