An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          





Discord slash command example



Example of discord slash command using JPA


github-sonar
sonar-gate
licence


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)