Code Monkey home page Code Monkey logo

bdomonsterbot's Introduction

About

Per request, here is my mostly working sea-monster loot calculating discord bot. It comes with no license (written or implied) and support will probably be nonexistant. While this program is not intentionally malicious in any way and does not record or store any data (outside of memory), it also was written with no regard for security or privacy.

Requirements:

  • Python 3.6 (or theoretically any version >3 and <3.7)
  • Pytesseract and Tesseract OCR version 3.05.02 (this is hard to find but some German university hosts an installer somewhere)
  • Everything else imported at the top of the file (I suggest PIP)
  • An existing discord application with a bot. The token should be plug-and-play.

Usage:

Set up your bot accout through discord, add the token to monsterbotpublic.py. To minimize CPU usage from parsing EVERY image uploaded to a discord server, I suggest using permissions to only allow the bot access to a text channel in which you only record sea-monster loot. There is also an empty string in the file which accepts the id of the channel you would like the bot to observe. This string can be obtained by enabling discord developer mode, right-clicking on the channel and clicking copy-id.

Once your bot is invited to the server and you have restricted its channel access, it is time to run the bot.

The program acts like a server and runs until force quit. It takes no arguments (nor does it accept any). Once your dependencies are all configured, you should be able to run with the following command:

py -3.6 monsterbotpublic.py

If possible, I recommend that you have your guildies crop any screenshots to just outside the boundary of the items for best results (see sample_1.jpg in /example_output/)

Debugging:

If you find issues and wish to refine the image recognition, the monster_test.py file runs a discord-less version of the program. It loops through the contents of the images directory and outputs what it finds with an OpenCV viewer, as well as printing detected values to console. The images in images are a mixture of well-functioning input, as well as some examples of input that produces errors which I never got around to fixing.

Fonts:

If you or someone in your guild uses a custom font, accuracy of the bot may decrease significantly. Tesseract OCR can be trained on custom fonts, but I have not done so since it is a pain.

<BRUTAL> WINS AGAIN

<BRUTAL> WINS AGAIN

bdomonsterbot's People

Contributors

alexcalamaro avatar

Watchers

James Cloos 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.