Thanks to visit codestin.com
Credit goes to github.com

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors