Skip to main content

Cleans messages from a discord channel older than a set time in days

Project description

DiscordMessageCleaner

PyPI version GitHub Sponsorship

Cleans messages from a discord channel older than a set time in days

Setup

pip install discord-message-cleaner

🚀 Setting Up & Inviting DeleteBot

  1. Create a Discord Application

  2. Add a Bot User

    • In your application sidebar, select BotAdd BotYes, do it.
    • Under Privileged Gateway Intents, enable Message Content Intent.
  3. Generate an Invite Link

    • In the sidebar, go to OAuth2URL Generator.
    • Under Scopes, check: bot
    • Under Bot Permissions, check at minimum:
      • Read Message History
      • Manage Messages
    • Copy the generated URL at the bottom.
  4. Invite to Your Server

    • Paste the URL into your browser, select your server, and authorize.

Run

discord_message_cleaner
  --token=<your_discord_bot_token>
  --channel_id=<your_discord_channel_id>
  --days=<number_of_days>

Docker

docker run -d \
  --name="DiscordMessageCleaner" \
  -e 'TOKEN=<your_discord_bot_token>'
  -e 'CHANNEL_ID=<your_discord_channel_id>'
  -e 'DAYS=<number_of_days>'
  rix1337/docker-discord-message-cleaner:latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord_message_cleaner-0.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_message_cleaner-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file discord_message_cleaner-0.1.1.tar.gz.

File metadata

  • Download URL: discord_message_cleaner-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for discord_message_cleaner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d4a268f00647a0f9fa06430104583b86a7af6fed5ab5eb083c7d31e0b36b2751
MD5 8036e0f94ceadc45bc0f0db22d795538
BLAKE2b-256 7c87d6acf9129cb8efeaceb9222e47e534f9c628a2fd74cb1b83458c2314278a

See more details on using hashes here.

File details

Details for the file discord_message_cleaner-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for discord_message_cleaner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 832a98a78bcb12d90e7ab760520e0c296dfe5c5218bcad8849f608cb9854c5d4
MD5 dcc44b9817e3377f3b5ad42ae2956b97
BLAKE2b-256 403b7f861f649b78bb12b0ab5a3577629b0b4c975335186f1ab05fa56add63a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page