GithubHelp home page GithubHelp logo

lamer1337crew / dinnerbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ptrfrll/dinnerbot

0.0 1.0 0.0 9.63 MB

Discord bot that tracks and responds to PUBG wins.

License: MIT License

JavaScript 100.00%

dinnerbot's Introduction

DinnerBot - PUBG Win Tracker

Build Status Discord Status

Dinner Bot

DinnerBot is a Discord bot that listens on a specfic channel for PUBG win screenshots and responds with WINNER WINNER CHICKEN DINNER and some emoji ๐Ÿ” ๐Ÿ† ๐Ÿฝ if the image is a winning screenshot. Useful for chicken-dinner-receipt channels where only winning screenshots are posted. Keeps track of win count for each tagged users.

Image Comparison

Winning screenshots are determined by comparing the uploaded screenshot with a known win screenshot (base.png). If the uploaded screenshot is within a certain similarity score to the base image, a win is awared.

Getting Started

Create a new dev app on Discord here.

Under the Bot section, click Add Bot and copy your bot's Token.

Edit the config.js file with your discord bot token and the channel-id of the channel you want it to listen on.

Add the bot to your server using bot authorization flow:

Example link (note CLIENT_ID != TOKEN):

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

Start the bot with:

$ npm install
$ npm start

Commands

!wins

Use !wins command to see current win count, you can tag users to show their count as well.

Ex. !wins @Dirka @tgruenen24 produces:

Win Count

Manual Wins

If an image is uploaded that scores too high but it should be a win, the user marked as AUTH_USER in config.js can mention the bot and it will award the win anyway (this only works for the last non-win). Dinner-Bot will respond with a random phrase taken from the good array in config.js

bot

If anyone else mentions the bot, it will repond with a response from the bad array:

bot

Configuration

Edit the config.js to change these settings.

IMG_SCORE_THRESHOLD: 15000, //if the image score is below this number it's awared a win (15,000 is arbitrary based off my testing)
LOGMODE: 'prod', //prod or debug
AUTH_USERS: { 
    //users/roles specified here can award wins that scored too high
    users: [''], //array of user ids
    roles: [''] //array of role names
},
BOT_RESPONSES_GOOD: good, //array of 'good' responses from bot, replied when AUTH_USER mentions bot
BOT_RESPONSES_BAD: bad //array of 'bad' responses from bot, replied when non-AUTH_USER mentions bot

Built With

dinnerbot's People

Contributors

ptrfrll avatar

Watchers

 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.