A Discord bot that provides STKAddons services and other STK-related needs.
Find a file
2024-01-20 16:17:53 +06:00
cogs integrate stk server starting 2024-01-20 16:17:53 +06:00
third_party/stkwrapper dev 2024-01-20 10:13:40 +06:00
utils some improvements and new stuff 2024-01-02 11:51:44 +06:00
.gitignore integrate stk server starting 2024-01-20 16:17:53 +06:00
bot.py integrate stk server starting 2024-01-20 16:17:53 +06:00
launch.py integrate stk server starting 2024-01-20 16:17:53 +06:00
LICENSE Initial commit 2023-12-31 11:27:32 +06:00
README.md some improvements and new stuff 2024-01-02 11:51:44 +06:00
requirements.txt Initial commit 2023-12-31 11:27:32 +06:00

linaSTK Discord Edition

This is lina rewritten to work on Discord. It has the same functions as the Revolt version but it's still work in progress and is incomplete. It is currently used for the SuperTuxKart Discord, but you can self host it yourself.

Features

General

  • Player tracking
  • STK Seen
  • Top 10 ranked players
  • Player searching
  • Friends list (partial)
  • Server list
  • PokeMap
  • Addon querying
  • Ranking info of a player

Internal

  • Authentication
  • Polling
  • Session revalidation

How to set up

This assumes you have knowledge on how to create a Discord bot and set up the proper intents and invite it, as well as how to use the Linux command line, and how to create a PostgreSQL database.

Only Linux is supported. Other platforms will not be supported.

  1. Initial set up
git clone https://github.com/searinminecraft/lina-discord
cd lina-discord
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Create a file named constants.py in the root of the folder. Then fill in the information.
# Accent color (used for embeds)
# You must use the hexadecimal representation of the color, or it won't work!
# Example: if your color is #fbce3a then put 0xfbce3a
ACCENT_COLOR = 0xfbce3a

# SuperTuxKart credentials
# This is required to make most features work.

# It is not recommended to use your main account for this.
# You can create an account here: https://online.supertuxkart.net/register.php

STK_USERNAME = ""
STK_PASSWORD = ""

# This is where you put your bot's Discord token. In any circumstances, DO NOT share this
# to anyone, not even your best friend that you trust! If you accidentally share it,
# IMMEDIATELY reset it.
TOKEN = ""

# Prefix for the bot.
# While lina mostly uses slash commands, some are hybrid and some only use
# the old prefix-based command system.
PREFIX = '&'

# PostgreSQL connection
POSTGRESQL = "postgresql://user:pass@localhost/db" 

# Max amount of players a user can track.
# If the user goes above this value, they will not be able to add additional
# players to track unless a user removes one to free up space.
MAX_PTRACK = 15
  1. Run the bot
python launch.py

License

This bot is licensed under the GNU Affero General Public License, version 3.

Certain portions of the source code are from Rapptz's RoboDanny bot, licensed under the Mozilla Public License, version 2.

Made with ❤️ by searingmoonlight