Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmbedFixer

A Discord bot that automatically replaces social media links with embed-friendly alternatives (fxtwitter.com, ddinstagram.com, tnktok.com, etc.). Messages are deleted and reposted via webhook under the original user's name and avatar.

Features

  • Auto-fix links — Twitter/X, Instagram, and TikTok links are replaced with embed-friendly domains
  • Seamless reposting — Messages are deleted and resent via webhook using the original user's name and profile picture
  • Per-server configuration — Each server picks which fixer services to use via slash commands
  • Curated by you — Bot maker defines available fixer options; server admins choose from the list
  • Persistent config — SQLite database stores all settings across restarts

Supported Platforms

Platform Domains Service Options
Twitter / X twitter.com, x.com fxtwitter.com, vxtwitter.com, fixupx.com
Instagram instagram.com ddinstagram.com, fxinstagram.com, vxinstagram.com
TikTok tiktok.com tiktxk.com, fixtiktok.com, tnktok.com

Setup

Prerequisites

Local Development

  1. Clone the repo and install dependencies:
npm install
  1. Create a .env file:
BOT_TOKEN=your_discord_bot_token_here
  1. Invite the bot to your server with scopes bot + applications.commands and permissions Send Messages, Manage Webhooks, Read Message History, Delete Messages, View Channels.

  2. Start the bot:

npm start

Deploy to Railway

  1. Push the repo to GitHub.
  2. On Railway.app, create a new project from your GitHub repo.
  3. Add environment variable: BOT_TOKEN = your Discord bot token.
  4. Add a persistent volume (New → Volume) mounted at /data.
  5. Deploy. The bot auto-applies default fixers when it joins a server.

Slash Commands

All commands require Manage Server permission.

Channels

Command Description
/channels add #channel Start monitoring a channel
/channels remove #channel Stop monitoring a channel
/channels list Show all monitored channels

Fixers

Command Description
/fixer set domain: Twitter / X service: fxtwitter.com Enable a fixer for a platform
/fixer remove domain: Twitter / X Disable a fixer
/fixer list Show current fixer configuration
/fixer defaults list Show the bot maker's pre-configured defaults

Help

Command Description
/help Show bot info and all available commands

Customizing Fixers

Edit curated-fixers.json to add, remove, or change fixer options:

"twitter": {
  "label": "Twitter / X",
  "domains": ["twitter.com", "x.com"],
  "default": "fxtwitter",
  "services": [
    { "id": "fxtwitter", "label": "fxtwitter.com", "replacement": "fxtwitter.com" },
    { "id": "vxtwitter", "label": "vxtwitter.com", "replacement": "vxtwitter.com" }
  ]
}
  • default — the service auto-applied when a server first adds the bot
  • stripSubdomains — subdomains to strip before fixing (e.g., TikTok's vt.)
  • Add new entries for additional platforms

Files

File Purpose
index.js Bot entry point and command handling
db.js SQLite database layer (auto-creates data.db)
logger.js Timestamped logging to bot.log and console
curated-fixers.json Bot maker's curated list of fixer services
.env Bot token and configuration (not committed)

Logs

Logs are written to bot.log in the data directory (DATA_DIR or project root) with timestamps:

[2026-05-23T12:00:00.000Z] [INFO] Logged in as EmbedFixer#1234
[2026-05-23T12:00:00.000Z] [INFO] Applied defaults to My Server
[2026-05-23T12:00:00.000Z] [ERROR] [123456789] Failed: Missing Permissions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages