Skip to content

argraur/RailgunBot

Repository files navigation

License: Apache-2.0 Java CI with Gradle Known Vulnerabilities

Misaka-chan Discord Bot

A simple utility Discord bot.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Java Development Kit 8 - 11.

Cloning

git clone https://github.com/argraur/RailgunBot -b master

Building

Linux & macOS:

cd RailgunBot; ./gradlew build shadowJar

Windows:

cd RailgunBot\
.\gradlew.bat build shadowJar

Running

java -jar build/libs/railgunbot-1.0-all.jar

Configuration

Configurations are located in src/main/resources/config.properties file.

Available configurations:

activity: Set bot activity (e.g. anime games)

command_prefix: Prefix for all commands received by a bot (default is '.')

giphy: Giphy Developer token

goshujinsama: Bot's master ID. Allows bot's master to override some ADMINISTRATOR-only commands and use ignore/pardon commands.

jenkins.url: Jenkins server URL

jenkins.user: Jenkins username

jenkins.pass: Jenkins user password or token (recommended)

token: Your Discord Bot token

Commands

Available commands at the moment:

.8ball <question> - Get answers to all of your yes/no questions!

.ban <mention> - Bans mentioned user (Ban permission required, for a bot and command issuer)

.calc - Simple calculator. Example: >calc 2 * 2 * 2 (spaces are mandatory!)

.coin - Flip a coin!

.color [attach image or url] - Gets dominating color out of given image.

.del [message link] - Delete given message. (Message manage permission required, for a bot and command issuer)

.gif <query> [mention] - Search gif for a given query

.guildid - Return guild's id

.hug <mention> - Hugs the mentioned user!

.ignore <mention> - Ignores given user.

.jenkins build <jobname> - Builds given Jenkins job

.jenkins status <jobname> - Returns status of last build of given job.

.juggle - Juggles members in a voice chat across all voice channels in the guild! DANGEROUS!

.kick <mention> - Kicks mentioned user. (Kick permission required, for a bot and command issuer)

.kitsu genre <genre> - Sends random anime of a given genre.

.kitsu search <query> - Searches anime by given query.

.level <command> - Returns access level for given command.

.mirror - !egassem nevig sorriM

.mock - mockS GiveN mESsAge

.mute <user> - Mutes given user in current guild

.long - loooooooooooooooooong

.pardon <mention> - Stops ignoring given user.

.ping - Pong!

.purge <n> - Purges last n messages.

.purge <link> - Purges all messages after given message link.

.prefix <prefix> - Changes prefix in current guild.

.sauce [attach image or pass url] - Searches for art sauce

.shell <shell command> - Executes shell command. Only for bot's master!

.slap <mention> - SLAP THAT LOSER!

.ud <word or expression> - Search for given word or expression on UrbanDictionary

.unmute <user> - Unmutes given user in current guild

.wait [attached image] - WAIT: What Anime Is This? Searches for anime using given screenshot from anime!

.help - Returns command list

.help <command> - Returns help for a given command

For mute/unmute

The bot will create 'Muted' role whenever any admin runs .mute command. But the bot won't give 'Muted' role any priority, so guild's admin should do it manually.

Built with

  • Gradle - Build automation tool
  • JDA - Java wrapper for Discord
  • Giphy4J - Java wrapper for Giphy
  • Jenkins Java Client API - Java wrapper for Jenkins
  • OkHttp - HTTP client for Java
  • ColorThief - Dominant color extractor for Java
  • Kitsu - Anime exploring site
  • SauceNAO - Anime art reverse image search engine
  • trace.moe - Search engine that helps tracing back the original anime by screenshot.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Arseniy Graur - Project creator - argraur

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.