PureImage Discord Bot Logo

PureImage Discord Bot

0

Invite PureImage Bot to your server and use its powerful phashing commands to detect reposts. Get the full PureImage Discord Bot guide here.

0 upvotes in July

PureImage Discord Bot Described:

A discord bot for automatically detecting reposts through way of phashing.
PureImage
QuickStart
Invite the Bot

First, click this link and select the desired server from the drop down.

Load up some settings

The bot handles settings through a settings.json file, this handles options such as what channels the bot is active on. Due to this, the bot won’t work when you first invite it and you will have to set it up. The instructions will be messaged to the server owner when you invite the bot.

Features
Repost Filter

By creating a PHash of every image posted into the selected channels and comparing it against new images, reposts are able to be detected according to the users settings. The system supports detection of compressed, cropped or even hue-shifted images by making use of multiple hashing algorithms. Sadly, due to performance reasons the bot won’t process images larger than 10MP, this will hopefully be fixed when the Porn Filter is added.

Porn Filter(Coming Soon)

Using the DeepDanbooru and nude.js projects, PureImage is able detect if a post is considered pornographic and either flag or delete it depending on the server configuration. Additionally, several other porn detection libraries such nude.py are used, the thresholds and settings can all be customized in the settings.

Coming Soon

New Features Coming Soon:

  • Additional Customization (Ability to change Messages, Config …etc.)
  • Porn Filter
  • Better Repost Detection
Changelog
[July 15] Public Release
  • Improved Documentation
  • Added a timeout settings for repost cog
[July 5] Beta 2.1
  • Fixed a database issue that prevented the bot from working
[July 5] Beta 2
  • Added Settings Cog, allowing customization from a JSON file
  • Moved from local storage to an sqlite3 database.
[June 28] Beta 1
  • Added Repost Cog, allowing for repost detection of duplicate images.
Config

Compared to other bots, the server config isn’t set and change via commands. Instead it’s stored in JSON which a server owner and message to the bot. This makes it easier for server owners to setup the bot as they don’t have to rely on bot commands, instead all options can be changed using a preset. In order to change the bots settings you should send it a [settings.json] file in a guild chat message using the ‘~set’ command.

JSON

The settings are stored in JSON, this is text based file format that is easy for computer and humans to understand. In order to help editing these settings try using an Online Editor that provides syntax highlighting.

Channel IDs

Many of the commands rely on channel ids, this a unique number that identifies a discord channel. In order to get these IDs either follow this Guide or use the ‘~id’ command.

Settings
Reposts

If the repost component of the bot

“Enabled”: true/false

The Channels that a bot will check for reposts in, stored in channel ids.

“Channels”: [1,2,3]

If the bot should delete reposts instead of just flagging them for people to see

“Delete”: true/false

The timeout for people to be able to repost an image in seconds (e.g. 86400 = 60 x 60 x 24 = 1 Day)

“Timeout”: 86400

Porn Filter (Coming Soon)

If the Porn Filter Component should be enabled

“Enabled”: false,

If the bot should use the NSFW tag to see what channels it should check.

“NSFWChannels”: true/false

the channels that the bot will ignore, for more control.

“IgnoreChannels”: [123,124,125]

The threshold used for determining if something is porn, between 1 and 0. 1 is confirmed and 0 is completely safe.

“Threshold”: 0.0 - 1.0

Messages

“rDetect”: ["> {AUTHOR},You seem to have posted a repost"],

The messages sent to someone when their repost is detected, randomly chosen. Additionally, the text will can formatted using the format strings below, just surround the word with semicolons:

Format Text:

- author
  - The repost message's author's name.
- AUTHOR
  - Pinging the repost message's author.
- origin
  - The original author's name.
- ORIGIN
  - Pinging the original author.

Formatting Example

"{AUTHOR}, Uh oh a repost you stole from {ORIGIN}"

“pDelete”: ["> Hmmmmmmm, You seem to have posted porn. I ask thou… why?"]

The messages sent to someone when their post is detected as porn, randomly chosen. Additionally, the text will can formatted using the format strings below, just surround the word with semicolons:

Format Text:

- author
  - The repost message's author's name.
- AUTHOR
  - Pinging the repost message's author.
- certainty
  - The certainty that this image is porn.

Formatting Example

["{AUTHOR}, Uh oh I'm {certainty} that's porn","{AUTHOR}, I think that might be porn"]

Hosting the Bot

I’m completely fine with you hosting the bot, even on a large scale. However, just don’t claim to have made the bot and make sure you post a link to this repo. After that it’s fair game.

In order to host the bot just install the python requirements using the requirements.txt

pip install -r requirements.txt

Then place your bot token into the .env file

TOKEN = “BOT TOKEN GOES HERE”

Then run the setup.py file in order to regenerate the databases.

python setup.py

Finally, run the main file

python main.py

Contributing

If you find any vulnerabilities, problems, just send me an email or file an issue.

Check out the home page for the full Discord Bot List.

Frequently Asked Questions

How do I add PureImage Discord Bot to my server?

You can add PureImage to your Discord Server by pressing 'Add PureImage Discord Bot' on this page.

More Discord Bots

Pokétwo Discord Bot Banner
Pokétwo Discord Bot Logo
3,071
1.5M

The Pokémon experience, on Discord. Catch, level, and evolve Pokémon, trade and battle with friends, and more. All free and open source.
Dank Memer Discord Bot Banner
Dank Memer Discord Bot Logo
1,528
9.1M

Meet the largest in-app indie game on Discord. A currency and fishing game for catching creatures, collecting items, robbing your friends, taking care of pets, building skills, and more!

Information

Prefix: ~
Servers: unknown
Users: unknown
Created by: ThatGayKid#4288
Short link: discord.ly/pureimage