An easy to use package for anti-spam features in discord.py.
Project description
DPY Anti-Spam
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.
Never would have thought I'd have to say this, but the package on Pypi which is the 'fixed' AntiSpam simply copies the code from this package and changes some strings to introduce spelling changes by the looks of it. Still points here, either way if you want actual features n such follow the below instructions.
How to use this right now?
Download the codebase:
> pip install Discord-Anti-Spam
A basic bot
import discord
from discord.ext import commands
from antispam import AntiSpamHandler
intents = discord.Intents.default()
bot = commands.Bot(command_prefix="!", intents=intents)
bot.handler = AntiSpamHandler(bot)
@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
Build Ideology:
- OOP approach
- Scalable -> Multi guild support out of the box
- Test Driven -> CI with Github Actions
Testing is done at python3.8 and above, due to the usage of unittest.IsolatedAsyncioTestCase
which
is not available at lower python versions. The package itself however, should work with
any version of discord.py rewrite and above.
Discord
Given the steady progress of this library I decided to create a discord. Come checkout the progress of the next release, give us ideas for what we should add, etc...
Helping out:
All help is appreciated, just create an issue or pull request! See here for more details.
License
This project is licensed under the MIT license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Discord Anti-Spam-0.9.0.tar.gz
.
File metadata
- Download URL: Discord Anti-Spam-0.9.0.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b070f5efc5e6595dcbb451d361a2a9469d4e8edefd6db442493e92853313572 |
|
MD5 | bf37c5bf87e7a4d9f3ea8f9e1d945863 |
|
BLAKE2b-256 | 13a9a79754efa48b6690828af7b13bed6e25dabe0b2cbd32137b31105235a941 |
Provenance
File details
Details for the file Discord_Anti_Spam-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: Discord_Anti_Spam-0.9.0-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de8d03b24056e18d1742c4f23287061b89e0f058c5b00aa53c03b364726e2a7 |
|
MD5 | 13bf4b1a4f833c8f5a2314f216ac59a2 |
|
BLAKE2b-256 | e71bfa0b9ef03d1b54497f6b6994e648e6816117f1eaede34668d6a4c69cb1b7 |