Giter Site home page Giter Site logo

poldekpl / saucebot Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 5.0 82 KB

Discord bot intended to make reverse image search easier through various search engines.

License: MIT License

Python 100.00%
discord discord-bot discord-py bot python python3 saucenao discord-developer-portal tineye google-image-search

saucebot's Introduction

SauceBot

A simple Discord bot utilizing multiple reverse search engines to make looking for sauce source easier.


SauceBot is a single-purpose Discord bot written in Python 3 with the latest (v1.5.0 at the time of writing this) discord.py library, meant to fulfill one goal - make reverse image search easier.

It is a functional bot and can be easily used as a reference for people wanting to write their own Discord bots in Python.

Running it yourself

Easiest way to replicate the environment in which the bot was created and is used is to clone the repository to a local directory on your PC and create a virtual Python environment right next to it. Make sure you've got Python 3 (3.5+) andpip3 installed first. After creating the virtual environment and activating it, run pip3 install -r requirements.txt.

Next you'll need to provide bot token (which you obtain from Discord Developer portal after creating your "application") in a token file in the same directory as bot.py.

Once all that is done, you've got the virtual environment activated and you navigated in the console/terminal to the main directory of the bot, launch it using python .\bot.py or python3 .\bot.py, depending on what's your OS and how you installed Python.

To invite the bot to your server, copy this link:

https://discordapp.com/oauth2/authorize?&client_id=CLIENT_ID&scope=bot&permissions=VALUE

to your browser, change CLIENT_ID to one shown for your "application" in Discord Developer portal, and VALUE to one you can get in Bot Permissions calculator, also in the Developer portal. Once you're done, press enter and go through the invitation process on the page this link will lead to.

Only permissions that SauceBot currently needs are:

  • Send Messages
  • Manage Messages
  • Add Reactions

Additionally, since the addition of Privileged Gateway Intents to Discord API, the bot also requires both intents, that is:

  • Presence
  • Server Members

If all goes well and you see the bot online in your server, send a message with sauce.help and bot will answer with usage instructions.

saucebot's People

Contributors

poldekpl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

saucebot's Issues

Didn't Process Discord Canary and PTB Message Permalink Correctly

When you use for example
sauce.a https://ptb.discordapp.com/channels/....
or
sauce.a https://canary.discordapp.com/channels/....
It didn't process the image but rather the message itself, so the result will be like this
image

While the correct one is like this
image
(Server, channel, and message ID is censored for privacy reason)

Python 3.8.2
Ubuntu Linux 20.04 on WSL2

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.