Skip to content

abdou-da0wew/triecback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Triecback - User Backup System for Discord Servers

Discord License: MIT

🧠 Triecback is a core part of the Triecbot smart ecosystem, designed to make server management smooth, smart, and professional.

🇪🇬 Arabic Translation


Tech Stack


✨ Features

  • 🔄 Full backup of all mutual servers
  • 🔐 Stores user roles and permissions accurately
  • 🔗 Auto-generates permanent invite links
  • 🛡️ Smart approval system for restoring sensitive permissions
  • 📬 Sends detailed DM reports to users
  • ☁️ MongoDB Atlas support for secure and fast storage
  • 📆 Auto-delete backups after 30 days to save space

🛠️ Requirements

Tool Required Version
Node.js v16 or higher
MongoDB Atlas or local instance
Discord Bot Permissions: MANAGE_ROLES, CREATE_INSTANT_INVITE, SEND_MESSAGES, VIEW_CHANNEL

🔧 Setup Instructions

1. Clone the project

git clone https://github.com/abdou-da0wew/triecback.git
cd triecback

2. Install dependencies

npm install

3. Configure .env file

TOKEN=your_token_here
MONGO_URI=your_mongodb_uri
PREFIX=!  # or any prefix you like
CLIENT_ID=your_bot_id

4. Start the bot

npm start

🚀 Usage Guide

🔸 Create Backup Command

!backup true false
  • First true/false: Save user roles?
  • Second true/false: Only include servers where you have admin rights?

✅ Backups are stored in the database and linked to each user’s account.


🔹 Restore Backup

  • When the user rejoins a server, Triecback will ask admins for permission to restore their roles.
  • Once approved, the roles and permissions will be applied automatically.

📂 Project Structure

src/
├── commands/        # All commands
│   └── backup.js    # Backup command
├── events/          # Discord events like guild join
│   └── guildCreate.js
├── models/          # MongoDB models
│   └── Backup.js
├── services/        # Backup and DB logic
│   ├── backupService.js
│   └── databaseService.js
├── utils/           # Helper utilities
│   ├── backupUtils.js
│   └── permissionUtils.js 
├── config.js        # Loads environment variables
├── .env             # Sensitive keys and configs
└── index.js         # Main entry point

📜 Supported Commands

Command Description Example
!backup <r> Create a backup with/without roles !backup true false

📸 Screenshots


🧠 Notes

  • 📅 Backups are automatically deleted after 30 days.
  • ✅ Bot must have admin permissions to apply roles and generate invites.
  • 📤 Backup reports are sent directly to the user via DM.

🤝 Contributing

Wanna improve Triecback? Fork and go wild:

git clone fork https://github.com/Abdou-rx/triecback
git checkout -b feature/super-idea
git commit -m "Added a cool feature 🔥"

📞 Support & Contact


⚖️ License

This project is licensed under the MIT License.


About the Developer

TriecBot Logo

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors