Code Monkey home page Code Monkey logo

duckbot's Introduction

Duckbot

General purpose slack bot

Current version: 2.3.0
main.py is the driver for the bot. It handles creating the bot, connecting to slack, and the rtm read loop
duckbot.py sets up the event handlers, assigning them appropriately and sending messages
eventHandlers.py contains all the event handlers and their specific parsers
commandHandlers.py contains the handlers for bot commands
util.py contains various utility functions, such as ID matching and exit codes

Bot return codes:

RC=0x exit codes are special meaning codes, usually for signalling monitor script
    RC=00 , bot exited normally and will not restart
    RC=01 , there was an uncaught python error and will not restart. Likely needs manual fixing
    RC=02 , bot exited normally and will restart after updating

RC=1x exit codes signify an error during bot set up
    RC=10 , invalid bot id was returned to bot, should restart
    RC=11 , failed to connect to RTM, possible network hiccup, should restart

RC=2x exit codes signify an error during rtm use
    RC=20 , generic error during RTM read, should restart
    RC=21 , timeout error during RTM read, should restart

RC=3x exit codes signify an error during command processing
    RC=30 , malformed user id found

duckbot's People

Contributors

nmarasc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

duckbot's Issues

Bug bounties

Way to submit bugs and receive bux as a reward
Needs some kind of github integration to track bugs and see if they're accepted

Blocked #26

Leaderboards

Keep track of top ranks in banks. (Gotcha, winnings, balance, etc)

Catch RTM errors

RTM read errors keep popping up on occasion, so they get caught as they appear.

Gacha pool

Create finite pool of whatevers for people to attempt to collect

Daily pulls

Allow for 1 free pull daily because that's how gacha works.

Requires #9

Threaded event processing

Handling events sequentially is slow and lame, thread each one to get through them faster.

Fairly low priority since there's not a lot of traffic.

Refactor 3

Dynamic loading of commands, so they don't need to be manually added each time

Admin user infrastructure for privileged commands

Clean up documentation, factor out redundant/repeated code

Betting and Payout

Allow people to bet on games and receive payout based on risk.

Requires: #3 to start

Official Refactor #1

Time to clean up and reorganize stuff again.

Main needs splitting up, bot interaction needs to be better, etc.

Buying pulls

Allow buying of gacha pulls with bux from bank to get the whatevers. Chances of good rewards heavily skewed against players.
Requires: bank from #3 and gacha pool from #8

Hook into discord

Cross connect to discord and watch the chaos unfold.

Needs heavy dual path coding and refactoring to make it happen.

Trade .GIF for DuckBux

In order to prevent the stagnation of the DuckBux economy, I need a function to upload gifs to Duckbot, where Duckbot will store those files on an attached disk until they are recalled and posted upon request.

Gamble bank and joining

Create the player bank and allow people to join. Needs persistence for some amount of time even through restarts.

Requires: #7 to finish

Bank balance overflow

If somebody gets real lucky, they can win enough to overflow their balance.

Shouldn't be able to underflow at least

Channel Label Automation

On a channel purpose update, allow for Duckbot to update its internal channel list with the purpose and any added labels.

Also update gamble approved list if proper label added.

Clean up when channels no long relevant

When a channel is deleted/archived, there no reason to keep it in the bot's internal list or have it in the approved channels lists.

If the bot is removed from a channel there's also no reason to keep the channel in the approved list if #17 is implemented.

Possibly only remove if there's enough to remove, so as not to do it too frequently.

More error handling

Find more errors and catch them to ensure clean shut down and no loss of data.

Duckbot Greet

Greet users when they join the team
Provide help to get started using, etc.

Ignore Slackbot

Slackbot sends out bot_messages with no bot_id field.
That breaks things...like my event parser

Integration with other bots

Allow Duckbot to talk and interact with other bots in the team.

Requires: Other bots to exist in the workspace

Bux recharge

When at 0 bux you're stuck. Need a way to generate them.

Timer, activity, etc
Probably a timer though

Link xposting

Allow for crossposting links on certain channels automatically

Recovery/Cleanup

Need a way to ensure clean shut down in the event of an error. Things like saving the bank/player state before croaking.

Persistent Bank Solution

Right now bank only lasts until bot restarts. Not a big deal until everything has been tested.

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.