Skip to content

krisharekar/CribBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

183 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Crib Bot

A feature-rich Discord bot built with Discord.js and MongoDB, designed to track and manage user donations (coins, items, daily, and weekly) in community serversโ€”especially those integrated with Dank Memer. The bot supports dynamic prefixes, role assignments, and real-time donation updates, making it ideal for gaming or fundraising communities.


๐Ÿš€ Features

  • Donation Tracking: Monitors coin and item donations (e.g., Dank Memer items), with daily and weekly summaries stored in MongoDB.
  • Donation Command: Moderators can use !donations <user> to view a user's total, daily, and category-specific donations in a clean embed.
  • Item Donation Processing: Detects item donations from Dank Memer (ID: 270904126974590976) in designated channels, calculates their value, and updates user records.
  • Dynamic Prefixes: Supports server-specific command prefixes for flexibility across multiple guilds.
  • Role Management: Automatically assigns donation-based roles to users.
  • Welcome Messages: Sends customizable welcome messages to new members.
  • Error Logging: Logs unhandled rejections and errors to a specified channel for reliability.
  • Top.gg Integration: Supports Top.gg webhooks for voting or analytics.
  • MongoDB Integration: Persists donation data for robust storage and retrieval.

๐Ÿ“ฆ Prerequisites

  • Node.js: v16.6.0 or higher
  • MongoDB: A running MongoDB instance (local or cloud, e.g., MongoDB Atlas)
  • Discord Bot Token: Obtain from the Discord Developer Portal
  • Dank Memer Bot: Required for item donation tracking (optional for non-item features)

โš™๏ธ Setup

1. Clone the Repository

git clone https://github.com/krisharekar/CribBot.git
cd CribBot

2. Install Dependencies

npm install

3. Configure Environment

Create a .env file in the root directory:

TOKEN=your-discord-bot-token
MONGODB_URI=your-mongodb-connection-string

Update config.json with your botโ€™s settings (e.g., default prefix, channel IDs).

4. Set Up MongoDB

  • Ensure your MongoDB instance is running.
  • Create schemas for donations and categories (see schemas/ directory).

5. Run the Bot

node index.js

๐Ÿ“š Usage

Commands

  • !donations <user>: Displays a userโ€™s donation stats.
    (Requires MANAGE_GUILD permission)

Example:

!donations @User#1234

Donation Channels

  • Configure donation channels in your server for item donation tracking.

Custom Categories

  • Define donation categories in category-schema for flexible tracking.

๐Ÿ—‚๏ธ File Structure

index.js                โ†’ Main bot file, initializes modules and event listeners  
donations.js            โ†’ Command to display user donation stats  
item-donations.js       โ†’ Handles item donation detection and processing  
schemas/                โ†’ MongoDB schemas for donations and categories  
assets/                 โ†’ Utility functions (e.g., prefix finder, role management)  
cache/                  โ†’ Caching for donation channels and item info  
donation-trackers/      โ†’ Modules for coin, item, daily, and weekly donation tracking  

๐Ÿ“„ License

This project is licensed under the MIT License.

About

๐Ÿ’ธ A feature-rich Discord bot for tracking and managing Dank Memer-style donations using MongoDB and Discord.js โ€” supports coins, items, roles, and more!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors