https://github.com/brandonfl/discord-slash-command-example
Example of discord slash command using JPA
https://github.com/brandonfl/discord-slash-command-example
discord discord-bot jda jda-bot jda-discord-bot slash-command slash-commands
Last synced: about 1 month ago
JSON representation
Example of discord slash command using JPA
- Host: GitHub
- URL: https://github.com/brandonfl/discord-slash-command-example
- Owner: brandonfl
- License: mit
- Created: 2022-01-29T15:48:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-29T16:41:41.000Z (over 4 years ago)
- Last Synced: 2025-03-28T16:45:35.971Z (about 1 year ago)
- Topics: discord, discord-bot, jda, jda-bot, jda-discord-bot, slash-command, slash-commands
- Language: Java
- Homepage:
- Size: 417 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Discord slash command example
Example of discord slash command using JPA
How to use •
Variables •
Licence •
Links
## How to use
#### Use with java
1. Compile `mvn clean package`
2. Run `java -jar target/bot.war` with variables
#### Use with tomcat
1. Compile `mvn clean package` and get the war file in `target`folder
2. Config the config file of your bot `CATALINA-HOME/conf/Catalina/localhost/bot.xml` with variables
3. Deploy the war `CATALINA-HOME/webapps/bot.war`
## Variables
| Key | Description | Default |
|--|--|--|
| LOG_FILE | Location of log file | ./log/bot.log |
| BOT_TOKEN | Token of the Discord bot | None - **required** |
| BOT_SETTING_GUID_DEVELOPMENT_ID | For development only: Upserting commands to a specific server will update the commands cache instantly, instead of taking up to an hour on global commands. | None |
| BOT_OWNER_ID | Discord bot owner | 226715707017134080 - **required** |
| BOT_CO_OWNER_ID | Discord bot co-owners (separated by a comma) | None |
## Licence
Project under [MIT](https://github.com/brandonfl/discord-slash-command-example/blob/master/LICENSE) licence
## Links
- [Discord Slash Commands FAQ](https://support.discord.com/hc/fr/articles/1500000368501-Slash-Commands-FAQ)
- [JDA (Java Discord API)](https://github.com/DV8FromTheWorld/JDA#jda-java-discord-api)
- [JDA-Chewtils](https://github.com/Chew/JDA-Chewtils)