Skip to content

atcmasta/AttendanceBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AttendanceBot

A discord attendance bot based on Discord4J (https://github.com/Discord4J/Discord4J) which can be used to register and create an overview of attendance for certain events.

Running

In order to run the Bot you will need to have the Java 8 Runtime installed. The first time you run the bot it will create a token.txt which will need a discord token in order to be able to connect.

Example:

java -jar AttendanceBot-1.1.0.jar

Getting a token

Quick guide to get a token:

Adding the bot to a server

To add your bot to a server use the following URL:

https://discordapp.com/oauth2/authorize?&client_id=CLIENT_ID&scope=bot&permissions=0

CLIENT_ID should be replaced with the ID for the application you have just created. (App details -> Client ID)

The log displays the correct URL with CLIENT_ID for your bot, once the token for the bot has been set and the bot has been started.

Commanding your bot

In order to get a list of commands, just type !help in a channel or private chat. This will list the available commands. For some commands further information is available bij adding the specific command to the !help command.

For instance: !help list

Changing command permission

The discord group that is allowed to use a specific command is defined by default in the default.properties. Every default can be overridden individually by specifying the command in a bot.properties file in the config/ directory relative to the directory where the bot is being ran.

An example config/bot.properties file might look like this:

exit=moderator

Changes will be picked up immediately.

Building

In order to build the bot for yourself you will need Maven. Run the following Maven command to build the .jar file:

mvn clean install

Releasing

In order to release you will need GPG available on the command line and a GPG key available to sign the artifacts.

See Working with pgp signatures for more information.

In order to perform a release, execute the following command:

mvn release:prepare release:perform -P release