Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skelmis/discord-anti-spam
Ever wanted a bot to automatically deal with spammers? This is your Python library for it.
https://github.com/skelmis/discord-anti-spam
bot discord discord-api discord-bot python
Last synced: about 2 months ago
JSON representation
Ever wanted a bot to automatically deal with spammers? This is your Python library for it.
- Host: GitHub
- URL: https://github.com/skelmis/discord-anti-spam
- Owner: Skelmis
- License: mit
- Created: 2020-09-16T12:04:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-24T10:25:37.000Z (over 1 year ago)
- Last Synced: 2024-05-01T16:17:10.149Z (8 months ago)
- Topics: bot, discord, discord-api, discord-bot, python
- Language: Python
- Homepage: https://dpy-anti-spam.readthedocs.io/
- Size: 1.03 MB
- Stars: 72
- Watchers: 5
- Forks: 17
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# DPY Anti-Spam
---[![Pytest](https://github.com/Skelmis/DPY-Anti-Spam/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/Skelmis/DPY-Anti-Spam/actions/workflows/pytest.yml)
[![Coverage Status](https://coveralls.io/repos/github/Skelmis/Discord-Anti-Spam/badge.svg?branch=master)](https://coveralls.io/github/Skelmis/Discord-Anti-Spam?branch=master)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI download month](https://img.shields.io/pypi/dm/Discord-Anti-Spam.svg)](https://pypi.python.org/pypi/Discord-Anti-Spam/)
[![Discord](https://img.shields.io/discord/780784732484141077.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/BqPNSH2jPg)Ever felt the need to handle spammers in your discord, but don't have the time or effort to do so yourself?
This package aims to help solve that issue by handling all the required logic under the hood, as well as handling the spammers.---
How to use this right now?Download the codebase:
```
> pip install Discord-Anti-Spam
```A basic bot
```python
import discord
from discord.ext import commands
from antispam import AntiSpamHandler
from antispam.enums import Libraryintents = discord.Intents.default()
bot = commands.Bot(command_prefix="!", intents=intents)
bot.handler = AntiSpamHandler(bot, library=Library.DPY)@bot.event
async def on_ready():
print(f"-----\nLogged in as: {bot.user.name} : {bot.user.id}\n-----")@bot.event
async def on_message(message):
await bot.handler.propagate(message)
await bot.process_commands(message)if __name__ == "__main__":
bot.run("Bot Token")
```And that's it!
Now, there will no doubt be bugs & changes etc. But, you can use this as is now and all I ask is you create an issue for anything you encounter while using this codebase.#### Docs can be found [here](https://dpy-anti-spam.readthedocs.io/en/latest/?)
---
### Support
Want realtime help? Join the discord [here](https://discord.gg/BqPNSH2jPg).
---
### License
This project is licensed under the MIT license