8000 GitHub - keycultist/TM: T/M is an open source Discord - Roblox integrator, with many features suited for Perma-Death and Roleplay games. · GitHub
[go: up one dir, main page]

Skip to content
keycultistPublic

About

T/M is an open source Discord - Roblox integrator, with many features suited for Perma-Death and Roleplay games.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

T/M

A Discord bot that lets server moderators ban and unban players in their Roblox experience, using Roblox's Open Cloud API. Each Discord server connects its own experience and API key, so one hosted bot can serve many communities.

Status: work in progress. See the roadmap for what's built and what's planned.

Features

  • /setup: connect your Discord server to your Roblox experience (admins only)
  • /ban: restrict a player from your experience, with an optional reason
  • /privacy: see what the bot stores and how it's protected
  • Per-server configuration, so each community uses its own credentials
  • API keys encrypted at rest (AES-256-GCM)

Roadmap

  • /ban command skeleton
  • /privacy command
  • SQLite storage for per-server config
  • Encryption module for API keys
  • /setup with key validation (configure, status, role, remove)
  • /ban connected to Roblox Open Cloud
  • /unban
  • Ban audit log
  • Tests for encryption and permission checks

How it works

  1. A server admin runs /setup and enters their Roblox universe ID and Open Cloud API key in a private modal.
  2. The key is validated, encrypted, and stored against that server's ID.
  3. When a moderator runs /ban, the bot checks their permissions, decrypts the key only at that moment, resolves the Roblox username to a user ID, and calls the Open Cloud User Restrictions API.
  4. The action is recorded in the server's ban log.

Getting started

Requirements

  • Node.js [VERSION, e.g. 18 or newer]
  • A Discord application and bot token (Discord Developer Portal)
  • A ROBLOX API token (Roblox API Portal)

Install

git clone [REPO URL]
cd [REPO FOLDER]
npm install

Configure

Copy the example environment file and fill in the values:

cp .env.example .env
Variable Description
DISCORD_TOKEN Your bot's token
CLIENT_ID Your Discord application's ID
ENCRYPTION_KEY A 32-byte secret (64 hex characters) used to encrypt stored API keys

Never commit your .env file. Generate a strong ENCRYPTION_KEY and keep a backup of it: if it's lost, stored API keys can't be decrypted and servers will need to run /setup again.

Run

node [ENTRY FILE, e.g. index.js]

Setting up your Roblox API key

Admins connecting a server need an Open Cloud API key:

  1. Open the Roblox Creator Hub and create an API key.
  2. Grant it the user restrictions permission for your experience only, and nothing broader.
  3. If possible, restrict the key to allowed IP addresses.
  4. Run /setup in your Discord server and enter your universe ID and the key.

Treat the key like a password: anyone holding it can restrict players in your experience. You can revoke it in the Creator Hub at any time.

Security model

  • API keys are encrypted at rest with AES-256-GCM and a unique nonce per encryption.
  • The master encryption key lives only in the host's environment and never in the repository.
  • Keys are decrypted only when a ban or unban runs, and are never logged or shown in Discord.
  • Setup happens through a private modal, and replies containing configuration are ephemeral.
  • Trust limitation: whoever hosts an instance controls the master key and could in principle access stored keys. If that isn't acceptable for your community, self-host this bot.

Found a vulnerability? Please report it privately via @KarmicCarmen on Twitter/X rather than opening a public issue.

Privacy

See PRIVACY.md for exactly what data is stored and how to delete it.

Contributing

Issues and pull requests are welcome. Please open an issue first to discuss larger changes.

License

MIT. See LICENSE.

About

T/M is an open source Discord - Roblox integrator, with many features suited for Perma-Death and Roleplay games.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0