Giter Site home page Giter Site logo

marahin / letter-bot Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 7.0 8.31 MB

Letter is a Discord bot for reserving respawns in Tibia.

Home Page: https://tibialoot.com

License: MIT License

Dockerfile 0.34% Makefile 1.19% Go 98.33% Nix 0.14%
booking bot discord respawn tibia

letter-bot's Introduction

Letter, Tibia's booking bot

Go Report Card License golangci-lint ci CodeQL


Letter is a Discord bot for reserving respawns in Tibia. It registers slash commands allowing users to manage their respawn bookings.
Currently used by servers with over 3k members.


buymeacoffee
If you like the bot and want to support its development, you can buy me a coffee!

Overview


Invite link, self-hosting

Hosted version is available on demand. Reach out on Tibialoot Discord Server.

Self-hosting is possible but it's your job to figure out how you want it done. If you require support, hit us up Tibialoot Discord Server.

Trivia

Letter bot originated within Refugees, the dominating guild on one of the oldest Tibia servers, Celesta.

Screenshots

Booking

booking command

Unbooking

unbooking command

Feedback

reservation outcomes

Pie chart showing distribution of reservations

summary pie chart

List of upcoming reservations

summary list

Development

Prerequisites

  • docker and docker-compose (unless you want to go bare-metal),
  • make (unless you want to run commands manually),
  • go (if you want to develop),

docker-compose

Initial setup

  1. Copy .env.example to .env and fill in the values (or leave as-is).
  2. Run docker-compose up -d to start the stack.
  3. Run docker-compose exec bot sh -c "bin/migrate" to apply migrations.
  4. Run docker-compose exec db bash -c "seed" to fill any entry-level data.
  5. Run docker-compose restart bot (as it failed originally, when the database was not set up).

After initial setup

  1. To start: docker-compose up -d
  2. Development should hot reload (recompile and restart the bot) on file changes.
  3. To stop:docker-compose stop or ... down

Shutdown / teardown

  1. To shut the service down, docker-compose stop
  2. (optional) To remove containers and networks, docker-compose down
  3. (optional) To remove the volumes, such as database, docker volume rm letter_bot_postgres

Database and migrations

If you change SQL schema in any way, remember to:

  • regenerate sqlc: make sqlc-generate - this generates Go wrapper around our queries,
  • run docker-compose exec bot sh -c "bin/generate_migration <YOUR_MIGRATION_NAME>" - so if you change a timestamp, you could name it "users_timestamps".

Contributing

We will be very happy for each contribution.

  1. Fork the repository
  2. Create a branch with your changes
  3. Push the branch to your fork
  4. Create a pull request
  5. Wait for the review

Credits

Letter-bot is one of many tools prototyped by (and for) TibiaLoot.com

Author: marahin

Contributors:

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.