GithubHelp home page GithubHelp logo

ketchup-waiter's Introduction

Ketchup Waiter

A Discord bot for the Ketchup Discord Guild made in Kotlin.

Manages events and clubs, allows users to create, manage and join them. May over time get some additional features: Games, Integrations, etc.

Made possible by kordlid/kord ❤️

Features

In the Discord Guild, use ketchup help for available commands.

Here are the main ones:

  • ketchup event create Create event channels
  • ketchup club create Create club channels

You can also use ketchup roadmap for a list of planned features.

Setup

GitHub has jar files attached to each release, you can download them there. They target java version 21. I run the bot on GraalVM 21, but it should work on any recent JVM. It uses low CPU and Memory.

The bot creates and uses a storage.json file in the working directory for configuration and persistence. This may in future be used to configure different run modes for production and development.

JVM

This is the main way to run the bot (other than from the IDE during development).

./gradlew fatjar --no-daemon
KETCHUP_BOT_TOKEN="" \
  KETCHUP_BOT_CLIENT_ID="" \
  java -jar build/libs/ketchup-bot-fatjar.jar

Native Image

Native image should make the bot slightly faster, but more memory efficient (which would be nice). But I haven't gotten this to run yet.

./gradlew fatjar --no-daemon
native-image -jar build/libs/ketchup-bot-fatjar.jar
KETCHUP_BOT_TOKEN="" \
  KETCHUP_BOT_CLIENT_ID="" \
  ./ketchup-bot-fatjar

Docker

Builds an amd64 linux image from source in a multi-stage docker build. Most reproducible way to build this project, last resort due to performance.

docker build . -t ketchup-bot:latest
docker run --rm -it \
  -e KETCHUP_BOT_TOKEN="" \
  -e KETCHUP_BOT_CLIENT_ID="" \
  ketchup-bot:latest

Run the container with:

docker run --rm -it \
  -e KETCHUP_BOT_TOKEN="" \
  -e KETCHUP_BOT_CLIENT_ID="" \
  mtibbecker/ketchup-bot:latest

Release

This is just for @mtib to remember how to do this:

docker tag ketchup-bot:latest mtibbecker/ketchup-bot:latest
docker push mtibbecker/ketchup-bot:latest
./gradlew fatjar
scp build/libs/ketchup-bot-fatjar.jar [email protected]:containers/ketchup-waiter/ketchup-bot-fatjar.jar 
# ssh [email protected]; tmux at -t ketchup-bot; ^C; cd containers/ketchup-waiter; ./start.sh

ketchup-waiter's People

Contributors

mtib avatar

Stargazers

 avatar

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.