Disturbed Docs
Disturbed Docs
  • Overview
  • Command List
  • SETTINGS
    • Getting Started
      • Currency / Economy
      • Currency Drop + Pick
      • greet / leave / boost messages
    • Configuration keys
  • AUTORESPONDER
    • Quick-start
    • Guides
      • Beginner I: Using Simple Placeholders
      • Beginner II: Using Simple Functions
      • Intermediate I: Ranges and Making Choices
      • Intermediate II: Locked Choices
    • Resources
      • Variables, Placeholders & Functions
      • Examples
        • .bake command
      • Utility commands / Examples
        • Self-Verification System
        • Antiswear/Blacklisted Words
        • Anti Link/Advertising
        • Click to Disable Pings (e.g. Partner Pings)
        • Say Command
        • Invite Reward System
  • Modules
    • Basic Features
      • AFK system
      • Ping On Join (POJ)
      • Giveaway System
    • Advanced Modules
      • On Duty System
      • Invite & Promo Tracking
Powered by GitBook
On this page
  • How It Works
  • Drop System Behavior
  • Listening for Chat Activity
  • Drop Triggers
  • Cooldowns
  • Picking Up Currency
  • Command: "pick"
  • Technical Details
  • Redis for Activity Tracking
  • Currency Drop Process
  • Message Cleanup
  • 1. A Currency Drop Appears
  • 3. A User Picks Up the Drop
  • Configuration & Setup
  1. SETTINGS
  2. Getting Started

Currency Drop + Pick

The Drop Currency System in OneeChan is an automated chat-based event where currency randomly appears in designated channels, and users must type pick to collect it. The system ensures engagement-base

Last updated 3 months ago

System is disabled by default. Enable it using the .

How It Works

  1. The bot listens for messages in configured Chat Channels (Configure the channels using the )

  2. If certain conditions are met (active users, message count), a currency drop is triggered.

  3. The bot posts a currency drop message.

  4. Users must type "pick" before the PickTTL (Default 25 seconds) timer runs out to claim the currency.

  5. The bot distributes the currency to the first user who picks it up.

  6. A DropCooldown is applied before the next drop can occur.


Drop System Behavior

Listening for Chat Activity

  • The system is triggered whenever a user sends a message in a configured chat channel.

  • The bot ignores messages from bots to prevent abuse.

  • The bot checks whether the drop system is enabled and if the message was sent in an allowed chat channel.

Drop Triggers

  • A drop will only occur if two conditions are met:

    1. Minimum number of unique users chatting (PickMinimumChatters)

    2. Minimum number of messages sent (PickMinimumMessages)

  • These numbers are tracked using Redis, ensuring that currency drops are based on real activity.

Cooldowns

  • A global cooldown (DropCoolDown) is applied to prevent frequent drops.

  • Each user also has a personal cooldown to prevent them from repeatedly picking up currency.


Picking Up Currency

Command: "pick"

  • When a user types pick, the bot checks:

    1. Is there an active drop?

    2. Is the user eligible to pick up the currency? (not on cooldown)

  • If successful, the user receives a random amount of currency within the configured range (PickMin and PickMax).

  • The bot logs the currency gain and applies a cooldown to the user.

Example Output:

@User has picked up 15 coins! 💰
  • The currency is automatically deposited into the user’s balance.

  • The bot deletes the "pick" message to keep the chat clean.


Technical Details

Redis for Activity Tracking

  • Active Users: Tracked with activeUsersKey, ensuring the system only triggers for engaged users.

  • Message Count: Stored as messageCountKey, tracking the number of messages in the channel.

  • Drop Cooldown: Ensures that drops do not happen too frequently.

Currency Drop Process

  1. Bot checks activity levels (message count and active users).

  2. If conditions are met:

    • A drop is announced in the chat.

    • The bot stores the drop in Redis, marking it as active.

  3. Users type pick to claim the drop.

  4. The bot checks Redis to see if the user is eligible.

  5. The bot assigns the currency and applies cooldowns.

Message Cleanup

  • The bot deletes the "pick" message after processing.

  • The currency drop announcement is removed automatically after a set time (DropTTL).

  • Uses RabbitMQ for delayed message deletion, keeping the chat clean.


1. A Currency Drop Appears

💰 Some coins just randomly appeared! Type "pick" to collect them, but hurry!

3. A User Picks Up the Drop

User2: pick
Bot: @User2 picked up 15 coins! 💰

(User2 is now on cooldown before they can pick up again)


Configuration & Setup

  • No direct setup is required, except configuring server keys (/setup).

  • The system is entirely automated based on server activity.

This system ensures engagement-based rewards, promoting active participation in chat while keeping the experience fair and balanced.

Configuration Keys
Configurations Keys