Skip to content

suhaybu/sanitizer-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanitizer Bot

Introduction

Sanitizer is a simple bot that uses regex to identify links for social platforms and replaces them with discord embed friendly links that allows you to view the content of the link without ever having to leave the discord app. Making peoples lives easier one step at a time! :)

The bot is developed using the serenity.rs library. Click here to view their GitHub repo.

This project is a reimplementation of Sanitizer Bot (Python) in the Rust programming language.

Features

  • No logs: No form of logs are saved.
  • Supports Multiple platforms: Currently works with Twitter, TikTok, and Instagram.
  • Configurable: You can change the behavior of the bot using /config.
  • User Installable App: The /sanitize app command can be used anywhere.
  • Handles Direct Messages: Will attempt to fix links sent directly in DM's.

Setup

  1. Create a .env file in the project root or add the following environment variables:
Variable Description Where to get it
DISCORD_TOKEN Discord bot token for authentication Discord Developer Portal
QUICKVIDS_TOKEN API token for TikTok and Instagram content processing QuickVids API
TURSO_DATABASE_URL Database URL for storing server configurations Turso Dashboard
TURSO_AUTH_TOKEN Authentication token for Turso database access Turso Dashboard
  1. Download the release compatible with your OS and run it!

  2. Optionally, if you wish to build it yourself instead:

git clone https://github.com/suhaybu/sanitizer-bot
cd /sanitizer-bot
cargo run --release

Usage

Once the bot is running, you can use the following commands:

  • /credits: To roll the credits
  • /sanitize: To fix the embed of your link
  • /config: to configure the bot

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Twitter - @suhayb_u

Acknowledgments

About

Sanitizer, a simple Discord app written in Rust that tries to fix url embeds in Discord chats.

Topics

Resources

License

Stars

Watchers

Forks

Languages