Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Webixly Security Bot

⚡ Discord Auto-Defense System — Hacker Style Edition

repo python discord license

📋 Overview

Webixly Security Bot is a powerful Discord security system that blocks spam, mass mentions, message floods, and unauthorized activity automatically. Every action is logged in the modlog channel.

⚙️ Requirements

  • Python 3.8+
  • Libraries:
  * `discord.py`
  * `python-dotenv`

🚀 Installation & Run

  1. Clone the repo:
git clone https://github.com/webixly/webixly-security-bot.git
cd webixly-security-bot
  1. (Optional) Create virtual environment:
# Create virtual environment
python -m venv security-env

# Activate environment
# Windows:
security-env\Scripts\activate
# macOS/Linux:
source security-env/bin/activate
  1. Install dependencies:
pip install discord.py python-dotenv
  1. Create a .env file:
DISCORD_TOKEN=YOUR_BOT_TOKEN_HERE
RESTRICTED_CHANNEL_ID=1234567899999999999
MODLOG_CHANNEL_ID=1234567899999999999
GUILD_ID=123456789012345678
  1. Run the bot:
python discordBot.py

Expected output:

✅ Logged in as Webixly Security Bot (ID: 123456789012345678)

🛠️ Features

  • Automatic spam detection & banning
  • Restricted channels with instant ban
  • Duplicate/rapid message defense
  • Mass mention detection
  • Message history wipe on ban
  • Full moderation logs

⚡ Commands

✅ 1. !ping

Check if the bot is online.

!ping

Response:

🏓 Pong! Bot is online and secured.

✅ 2. !setrestricted (Admin Only)

Set a protected channel where any message sent triggers an instant ban.

!setrestricted #channel

Or:

!setrestricted channel_name

What happens:

  • Saves channel as restricted

  • Pins automatic warning

  • Any user message triggers:

    1. Message deletion
    2. Cleanup of history
    3. Instant ban
    4. Log entry

🚫 Restricted Channel Behavior

When you set a channel as restricted:

  • A pinned warning is created

  • Any message sent triggers:

    1. Message deletion
    2. Instant ban
    3. Removal of last 5 minutes of messages
    4. Log in modlog channel

🔄 Anti-Spam Config (config.json)

{
  "msg_threshold": 5,
  "time_window": 7,
  "duplicate_threshold": 4,
  "mention_threshold": 5,
  "delete_history_minutes": 5
}

📂 File Structure

  • bot.py — main script
  • .env — environment variables
  • config.json — settings

🧪 Example

!setrestricted #security-zone

Whitelist Management (Admin Only)

✅ !whitelist add @user

Add user to whitelist (exempt from security rules).

!whitelist add @username

✅ !whitelist remove @user

Remove user from whitelist.

!whitelist remove @username

✅ !whitelist show

Display current whitelist.

!whitelist show

#⚙️ Spam Configuration (Admin Only)

✅ !spam threshold [number]

Adjust message threshold limit.

#!spam threshold 6

✅ !spam window [seconds]

Adjust monitoring time window.

!spam window 10

✅ !spam duplicate [number]

Adjust duplicate message threshold.

!spam duplicate 3

✅ !spam mentions [number]

##Adjust mention limit threshold.

!spam mentions 4

✅ !spam settings

Display current spam configuration.

!spam settings

Anyone typing there gets banned instantly + logs recorded.

🤝 Contributing

Feel free to open Issues or PRs. Follow existing code style and include clear descriptions.

🪪 License

MIT License — use freely with credit.

🔥 Credits

Developed by Pablo — Webixly Security Secure • Smart • Automatic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages