Giter Club home page Giter Club logo

spam-ban's Introduction

Discord Ban Bot

This is a Python Discord bot that automatically bans users when they post in a specific channel. It was developed on Python 3.10.14 but should work on any version that is 3.10+

Prerequisites

Before running the bot, make sure you have the following:

  • Python 3.10+ installed
  • Discord.py library installed (pip install discord.py)

Setup

  1. Clone this repository to your local machine.
  2. Create a new Discord bot on the Discord Developer Portal.
  3. Make a copy of .env.example and call it .env
  4. Copy the bot token and paste it in the .env file.
  5. Customize the .env file to specify the target channel ID, message id of the message to edit
  6. Start the bot and run the bootstrap command to set the bot's message up
  7. Shutdown the bot then edit the env file with the values provided by the bootstrap command.
  8. Start the bot again

Usage

Once the bot is running, it will monitor the specified channel for new messages. If a user posts in that channel, they will be automatically banned and the specified ban message will be sent.

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the WTFPL.

spam-ban's People

Contributors

akanealw avatar dingosgotmybaby avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.