Skip to content

MonobyteStudios/OnlyOneMessage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OnlyOneMessage

Command Every Message.

Python 3.12+ License: AGPL-3.0 Discord.py

❓ Overview

OnlyOneMessage is a feature-rich Discord bot that provides server admins complete control over text channel behavior. Set slowmodes surpassing Discord's limit, log individual member cooldowns, and fine-tune settings for each individual channel; all through a straightfoward interface using Discord's slash commands.

v2.0a [Build 2026.7.5]

πŸ“Ž Visit the website: onlyonemessage.monobyte.studio

❓ Documentation: onlyonemessage.monobyte.studio/docs

⚑ Features

  • ⏳ Advanced Slowmode Control - Set channel slowmodes lasting hours, days, or even indefinitely; surpassing Discord's limitations.
  • πŸ’¬ Smart Message Management - Allow members to chat again once they delete their message, providing complete flexibility in message flow.
  • πŸ“ Detailed Logging - Automatically log when members enter slowmode and when they expire, including other essential options
  • πŸ“Š Analytics - Built-in Prometheus tracking for reliability
  • 🐬 Docker Supported - Containerized deployment with Docker for easy usage

πŸ–₯️ Installation

OnlyOneMessage is fully supported and hosted by Monobyte Studios, invite the bot here. If you would like to self-host this bot, follow the instructions below:

Prerequisites

  • Python (3.10+ recommended)
  • Docker
  • Discord bot token (Get one from the Discord Developer Portal)

Note

OnlyOneMessage uses MongoDB for its database; a self-hosted setup has already been provided in docker-compose.yml. Edit if needed.

Instructions

  1. Clone the repository:
git clone https://github.com/MonobyteStudios/OnlyOneMessage.git
cd OnlyOneMessage

If you'd like to use the nightly branch:

git clone -b nightly https://github.com/MonobyteStudios/OnlyOneMessage.git
cd OnlyOneMessage

Warning

The nightly branch of OnlyOneMessage is a beta build of a later version, expect bugs when using it.

  1. Configure environment variables

Create the file .env inside /data with the following:

# You may use the same Discord bot token for both fields
PROD_TOKEN=
DEV_TOKEN=

MONGO_URI=mongodb://admin:<CHANGEME>@mongodb:27017
MONGO_INITDB_ROOT_USERNAME=admin # Change if needed
MONGO_INITDB_ROOT_PASSWORD= # Make sure this password matches what's provided in the URI!

MONGO_PROD_DB=onlyonemessage-production
MONGO_DEV_DB=onlyonemessage-development

# These fields may be safely removed if you don't want them
TOPGG_TOKEN=

Tip

There's a .env.example file inside the data folder. Use it as a reference!

  1. Configure metadata

The metadata file for OnlyOneMessage can be found in /data/json/metadata.json; update the provided fields in the file to your liking:

{
    "development": false, # Whether to use the development or production environment
    "metrics_support": false, # Whether to collect metrics or not (If enabled, port 9200 will be opened)
    "api_support": false, # Whether the API is enabled or not (If enabled, port 9300 will be opened)

    "admins": [
        # Discord user ID's who have access to development commands
    ],
    "internalguilds": [
        # Discord guild ID's where admins can execute development commands
    ]
}

Additionally, edit the file /data/json/channels.json to match your setup. You do not need to touch this file if metrics_support is set to false.

  1. Run the bot:
docker compose up -d

The bot will automatically install dependencies and start the container with automatic restart enabled. To view the container's logs:

docker logs -f onlyonemessage

Uninstallation

Simply run this in the root directory:

docker compose down -v

Warning

-v will clear all volumes related to OnlyOneMessage, including it's database. If you wish to keep it's database, leave -v out.

πŸ“ Project Structure

OnlyOneMessage/
β”œβ”€β”€ .github/workflows/
β”‚   └── deploy.yml           # CI/CD, builds + deploys on push to main
β”œβ”€β”€ build/
β”‚   β”œβ”€β”€ essential/           # Essential functions & variables to be used in modules, such as logmsg
β”‚   β”œβ”€β”€ modules/
β”‚   β”‚   β”œβ”€β”€ commands/        # Slash commands, grouped by purpose
β”‚   β”‚   β”‚   β”œβ”€β”€ dev/           # Development-only commands, accessible to "admins" in metadata.json
β”‚   β”‚   β”‚   β”œβ”€β”€ essential/     # /config & /configchannel commands
β”‚   β”‚   β”‚   β”œβ”€β”€ main/          # Primary commands (/addchannel, /removechannel)
β”‚   β”‚   β”‚   └── misc/          # Everything else
β”‚   β”‚   β”œβ”€β”€ core/            # Required modules (MongoDB, error handler)
β”‚   β”‚   β”œβ”€β”€ events/          # Event listeners (on_message, on_member_update, etc.)
β”‚   β”‚   β”œβ”€β”€ integration/     # Integrations for services (top.gg, API)
β”‚   β”‚   └── loops/           # Background tasks
β”‚   └── main.py               # Entry point (Run this to start the bot)
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ backups/               # MongoDB backups (mongo-backup service)
β”‚   β”œβ”€β”€ json/                  # Configurations
β”‚   β”‚   β”œβ”€β”€ channels.json       # Channels reference (applicable if metrics_support in metadata is set to true)
β”‚   β”‚   └── metadata.json       # Bot-wide configuration (see Installation)
β”‚   β”œβ”€β”€ .env                   # Your local environment config
β”‚   β”œβ”€β”€ .env.example           # Reference for .env, may be removed
β”‚   └── log.log
β”œβ”€β”€ .gitignore
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── requirements.txt

πŸ› οΈ Contributing to OnlyOneMessage

We welcome contributions to OnlyOneMessage from the community! Your help is appreciated, whether you're adding features, fixing bugs, or adding documentation.

Note

If you are going to make major changes to OnlyOneMessage, open an issue first to discuss before investing time in it.

Contributions We Welcome

  • Bug Fixes - Issues and their solutions
  • Features - Command improvements/new functions
  • Documentation - README improvements, code comments, documentation under OnlyOneMessageWeb
  • Refactoring - Quality of life changes, code quality improvements

Getting Started

  1. Fork this repository

  2. Clone your fork:

git clone https://github.com/<YOUR_USERNAME>/OnlyOneMessage.git
cd OnlyOneMessage
  1. Create a branch on your fork:
git checkout -b <BRANCH>/<YOUR_CHANGE>
  1. Continue setting up the bot through the Installation section

Making Changes

Here's a checklist on what your changes should follow:

  • Keep commits clean; each commit should be logical
  • Follow the existing style with the codebase unless necessary to change it
  • Add comments for logic that isnt obvious

Before making a Pull Request

  • Verify your changes work in a testing server
  • Submit one change per pull request (exceptions apply)
  • Update documentation if your changes affect this README or comments

Submitting your Changes

  1. Push to your fork, if you haven't

  2. Open a Pull Request on this repository with the following:

    • A clear title describing your changes
    • A detailed description on what you've done
    • Reference related issues if needed
    • Screenshots/logs if necessary
  3. Respond and edit to changes if requested

Questions?

If you have any questions regarding this, see our Support section, open a new issue, or check our documentation for further details.

Thank you for contributing! πŸ’–

πŸ“° License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), see the LICENSE.txt file for more information.

What this means:

  • βœ… Free to Use - You can freely use the bot by inviting it to your own server

  • βœ… Free to Study - You can inspect & learn from it's source code

  • βœ… Free to Modify - You can create modified versions for personal or community use

  • ⚠️ If you host your own instance of this bot as a service, you must:

    • Provide access to your complete source code, including modifications
    • Release all source code under APGL-3.0 OR contact Monobyte Studios for a commercial license

Why this license?

Monobyte Studios provides and maintains OnlyOneMessage as a hosted service; AGPL-3.0 ensures the community will benefit from improvements while protecting against unfair exploitation of our work.

❓ Support

You can receive support by joining our support server, creating an issue on this repository, or by emailing us.


Made with ❀️ by Monobyte Studios

About

Source code for OnlyOneMessage; a Discord bot that allows further management for channels.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors