Core features
This document provides a deep-dive into the architectural mechanics of Inco's core Q&A engine.
1. Direct-to-DM Message Delivery
Unlike traditional bots that post anonymous questions into public channels where they get lost in chat noise, Inco sends every anonymous question directly to the recipient's Discord Direct Messages (DMs).
Fallback Gateway for Error 50007 (discord.Forbidden):
If a recipient has server DMs turned off or does not share a mutual server with Inco:
- The Discord API returns
discord.Forbidden(Error code50007: Cannot send messages to this user). - Inco automatically catches this exception.
- An ephemeral prompt is returned to the sender with the Mutual Hub Invite Link (discord.gg/PkFXp468bV), explaining that the recipient needs to enable DMs or join the Mutual Hub to bridge communication.
2. Two-Way Anonymous Dialogue
Inco pioneers a unique Two-Way Reply System:
- The recipient can click the persistent Reply Anonymously button on any received question embed.
- A Discord Modal appears allowing them to write a reply (5 – 500 characters).
- The reply is delivered to the original sender's DM, quoting the original question for context.
- Neither user learns the identity or Discord tag of the other party.
3. Silent Shadow Blocking
Safety and harassment prevention are paramount in anonymous platforms:
- Recipients can click Block Sender on any message.
- The sender's snowflake ID is securely stored in
blocked_relationsmapped to the recipient. - The sender is NOT notified that they were blocked.
- If the blocked user attempts to send another question, the bot returns a mock success message (
Message Delivered!), but drops the message internally without delivering it. - This prevents abusers from knowing they have been filtered and prevents retaliation or account switching.
4. Presence-Aware 3-Hour Buffer & Pause/Resume Engine
For Free Tier users, question boxes are designed with an intelligent engagement cycle:
Inbox opened
Standby state. The timer is NOT ticking yet.First question arrives
Timer starts ticking
Active 3-hour countdown (10,800 seconds buffer).Promo in Custom Status
Paused. Question box stays open 24/7 as long as status remains.Promo removed
Resumes. Ticking continues from exact remaining seconds.Timer reaches 0s
Inbox auto-closes
Inbox closes automatically and Inco sends an expiry DM notification.Architectural Details:
- Standby State: When
/inbox openis executed,remaining_secondsis set to 10,800,is_paused = 0, andhas_received_first_msg = 0. The timer does not deduct any seconds until a question arrives. - First Question Arrival: As soon as a question is delivered,
has_received_first_msgis toggled to1. The bot checks the recipient's presence immediately:- If the recipient's Custom Status contains the promo keyword (e.g.
inco), the timer is immediately marked Paused (is_paused = 1). - If no promo keyword is detected, the timer starts counting down from 10,800 seconds.
- If the recipient's Custom Status contains the promo keyword (e.g.
- Reactive Gateway Updates (
on_presence_update):- Whenever Discord emits a presence event for the user, Inco inspects
activitiesin real-time. - Adding the promo keyword pauses the timer instantly.
- Removing the promo keyword resumes countdown from the exact remaining seconds.
- Whenever Discord emits a presence event for the user, Inco inspects
- Periodic Watcher Task (
inbox_watcher_task):- Runs every 60 seconds to tick active countdowns and automatically send an expiry notification DM when time reaches 0.
- Administrative Buffer Adjustments (
/inbox adjust_time):- Bot owners can manually add, subtract, or set custom status buffer time for any user.
- Accepts username, @mention, or User ID with real-time autocomplete suggestions (matching
/askbehavior) and optional DM notifications.
5. Security & Content Sanitization
- URL & Invite Filtering: Questions containing
http://,https://,discord.gg/, ordiscord.com/invite/are automatically rejected before dispatch. - Debouncing: Persistent buttons feature a 2.0-second debounce per user/message to prevent click spamming and duplicate modals.
- Rate Limiting: Dispatches enforce a strict 60-second cooldown per sender.