On this page

Documentation

For players: how to book. For administrators: how to configure the rules. Command names and descriptions in Discord are in English; the bot answers in Polish by default (/settings language changes that).

For players

  1. /register character submits a Tibia character and gives you a code. Paste it in the "Comment" field on tibia.com.
  2. /register verify checks the code through TibiaData and grants the role. Your Discord nickname must match the character name.
  3. /booking add from:21:00 to:23:30 in a spot's channel reserves the range (times in Tibia server time, Europe/Berlin). The spot and day options let you pick another spot or day.

Commands for everyone

CommandWhat it does
/register charactersubmits a character and gives you a code to paste on tibia.com
/register verifychecks the code and grants the role
/settings languagethe language of the bot's answers to you (pl or en)

Bookings

Available to verified players.

CommandWhat it does
/booking addreserves a spot for a time range
/booking updatechanges or shortens your own booking
/booking cancelcancels your own booking
/booking listshows your ongoing and upcoming bookings
/booking show-freeshows the spots that are free for the whole given range

Daily, standing bookings

Available once an administrator turns them on. A daily does not block a spot permanently and has no priority: the bot makes an ordinary booking for a given day when that day enters the booking window. If someone was quicker, that day is lost and you see it on your list. Cancelling one generated booking (/booking cancel) removes only that day; the daily stays.

CommandWhat it does
/booking daily addsets a standing booking: every day or on chosen weekdays
/booking daily listshows your dailies and the days skipped because of a collision
/booking daily cancelremoves a daily together with its upcoming bookings

For administrators

Management commands

CommandWhoWhat it does
/admin cancelmanagement rolecancels any booking
/admin verifymanagement rolemanual verification when TibiaData is down
/config …configuration roleall bot settings (below)

/admin and /config are hidden by default from people without administrator permissions. The bot checks permissions anyway.

The /config settings

Sub-commandMeaning
categories add|removecategories whose channels are spots (there can be several)
verified-rolethe role after verification (with a role it sets it, without one it clears it)
manage-rolethe role that manages bookings
config-rolethe role that may configure the bot
daily allowed:trueturns dailies on (off by default)
booking-windowhow far ahead players may reserve (below)
daily-limita player's time limit per spot per day (3.5 hours by default)
multiple-blockswhether a player may have several bookings per spot per day
conflictswhether bookings of different players may overlap
show, resetview the settings and go back to the defaults

A change applies to later bookings; existing ones stay. Until the bot is configured only /config works.

Booking window

  • /config booking-window rolling [hours] (24 by default): a booking must fit within the chosen number of hours ahead (1 to 48).
  • /config booking-window server-save: the window ends at the nearest server save (10:00 server time). A booking must end at the latest at that moment, so at 9:00 you can book at most until 10:00, and after 10:00 until 10:00 the next day. In this mode the daily limit and "one block per day" count a day from server save to server save, and a daily crossing 10:00 is not accepted.

A refusal because of the window says until which time you can reserve.

Limits and conflicts

  • A player cannot have two bookings that overlap in time, on any spots. This rule is fixed and applies to dailies too.
  • On one spot a player may have at most the limit in a day (/config daily-limit hours:3.5).
  • /config multiple-blocks allowed:false leaves a player one booking per spot per day.
  • /config conflicts allowed:true allows bookings of different players to overlap. The post then shows the order number [n] and ⚔️ between entries. The bot does not pick a winner; the players settle it.

Running your own instance

The bot runs on Cloudflare Workers with a D1 database.

  1. In the Discord developer portal create an application and a bot. Turn on "Server Members Intent": every 15 minutes the bot compares players with the server's member list.
  2. Add the bot to your server with the permissions: manage roles, read channels, send and edit messages. The bot's role must be above the role granted after verification.
  3. Install the dependencies (npm install), create the database (npx wrangler d1 create utevolux) and fill in the Worker configuration: database id, application id, public key and server id.
  4. Set the token secret (npx wrangler secret put DISCORD_BOT_TOKEN), apply the migrations (npx wrangler d1 migrations apply utevolux --remote), register the commands (npm run register-commands) and deploy (npx wrangler deploy).
  5. In the portal set the "Interactions Endpoint URL" to the Worker's address ending in /interactions.
  6. On the server, as an administrator: /config categories add, /config verified-role, optionally the management and configuration roles and the post language.
The bot token is a secret: keep it only as a Cloudflare secret and in a local file that you never commit to the repository.