Skip to content
An example bot for the Javacord library.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Added CircleCI configuration file Mar 8, 2018
gradle/wrapper Use binary Gradle distribution Aug 7, 2018
src/main Update Javacord dependency to 3.0.3 Jan 29, 2019
.gitignore Add a logging configuration that logs INFO to console and DEBUG to file Aug 6, 2018
LICENSE.txt Added licence information Feb 27, 2018 With Gradle 4.9 there is finally a standard way to provide commandlin… Aug 7, 2018
build.gradle Update Javacord dependency to 3.0.4 Apr 9, 2019
gradlew.bat Replaced Maven with Gradle Aug 6, 2018
settings.gradle Use proper compiletime / runtime separation Aug 6, 2018

Javacord Example Bot Javacord Wiki Discord Server

This bot is an example for the Javacord library.


The bot currently supports the following commands:

  • !copyAvatar Sets the avatar of the bot to the avatar of the user who used this command. This command can only be used by the creator of the bot. You can find the implementation here:
  • !userInfo Shows some basic information (id, name, etc.) about the user who used this command. You can find the implementation here:

Running the bot for testing

To run the bot right from Gradle (just for testing, not for production) you can do gradlew run --args your-bot-token-here. You can view the login process by looking at the class.

Building the bot for production

To get a distributable package you run gradlew distZip. The created zip is located at build/distributions/ and contains all necessary things to run the bot, except the token. Take a look at the build.gradle file.

Running the bot for production

After you built the distributable package as described in the previous section, you can copy over the zip file to where you want to run your bot. There you unzip it whereever you like and run one of the included start scripts.

cd examplebot-1.0.0
bin/examplebot your-bot-token-here

The log file will be created in a log directory where you execute the last command.

You can’t perform that action at this time.