Giter VIP home page Giter VIP logo

javacord-bot's Introduction

Javacord Bot

This is the bot used on the Javacord server.

I just want to use Javacord :-(

In this case you are wrong here. Just head over to the Javacord repository.

What's the difference to the example bot

The example bot is exactly what its name suggests: A bot which is solely used as an example for Javacord. It tries to cover some basic concepts to give you an idea how a bot using Javacord may look like. It is kept simple and has very verbose comments.

This bot however is actually used on our Discord Server and thus may contain a lot of specific features which are most likely not relevant to you. Simplicity also is not a goal for this bot, but you can still use this bot as a reference if you want to.

How to build it

To build a distribution archive execute ./gradlew distTar or ./gradlew distZip.

How to run it ...

... locally

  • execute ./gradlew installDist
  • (optional) store your discord api token in a text file
  • execute build/install/javacord-bot/bin/javacord-bot <token> or build/install/javacord-bot/bin/javacord-bot <path to the file with the token>

... manually

  • copy the built distribution archive from build/distributions/ to the system where you want to run it
  • unpack the archive somewhere
  • (optional) store your discord api token in a text file
  • execute javacord-bot/bin/javacord-bot <token> or javacord-bot/bin/javacord-bot <path to the file with the token>

... with Docker

  • build the Dockerfile with docker build .
  • run the generated image. The token has to be provided with the DISCORD_TOKEN environment variable

javacord-bot's People

Contributors

bastian avatar burdoto avatar comroid-commit avatar joshix-1 avatar saladoc avatar vampire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

javacord-bot's Issues

HTML to Markdown conversion

For previews, like in the Wiki Command, it would be nice to correctly approximate the formatting of the previewed web page. For that we'll need to take the HTML content and properly replicate the formatting in markdown to the best of our ability.

The following formatting elements will be required:

  • <strong> to **
  • <em> to *
  • Headings (likely just treated as bold)
  • Weblinks
  • <code> both inline and in block form

Basic info commands

!teamcity - links to the TeamCity server.

!readme - links to Javacord's Readme page.

Standardize Error Handling

Right now both the !docs and !wiki commands may encounter errors during their execution. Since that may happen as well with future additions, we should find a standardized way of dealing with exceptions during program executions in order to stay consistent.

Implement a !timeout command

Create a command !timeout <user> <time> that temporarily mutes a user.

A muted user can not post messages or reactions and is unable to join voice channels. If they were in a voice channel when being muted, they are also moved to the server's AFK channel if possible.

The command is available to the Maintainer group (id 151325992038825984) in an unlimited form and to the contributor group (id: 399530229732868096) in a form that is limited as follows

  • can be used a maximum of X times over a 24 hour period by the same person
  • will mute the target for a maximum duration of Y

After the time elapses a muted person is automatically unmuted. Subsequent calls for the same target will overwrite their timeout duration. A duration of zero or smaller acts as an unmute.

All mute / unmute operations are to be logged to a channel specified by ID.

Improve Search commands

The /wiki and /docs commands both perform searches.

We should investigate if and how the search can be improved for users.

Possible techniques to explore:

  • Auto-Completion for known Keywords / Classes
  • Fuzzy Searches
  • ...

Detect latest javacord version.

  • Introduce a !latest command providing the latest javacord version
  • Rewrite the !maven and !gradle commands to include the latest version instead of the one used by the bot.

Option to limit bot to specific channel

I would like to add the bot to the DiscordApi server, but the commands of the bot should be limited to the java_javacord channel (id 381889796785831936) without requiring any special permission configuration (as I only have permissions to edit the permissions of the java_javacord channel).

I see two options:

  • Hardcode the id of the channel
  • Make it configurable via a command

We also have to consider commands like !timeout that should be limited to the Javacord server.

Attempt to automatically rebase pull requests

Add a !rebase <pr> command available only to the Maintainer group (id: 151325992038825984).

If <pr> identifies a pull request to Javacord (or another project by the Javacord Organization), the bot attempts to rebase the pull request. This will be most likely done via a bash script that the bot will be able to run.

The bot is to report whether the rebase was successful or failed.

Automatically detect latest Javacord version

The maven and gradle commands should not be limited to the version the bot is currently running on. They should fetch and display the latest release version, no matter which version of javacord powers the bot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.