Giter Site home page Giter Site logo

bee-storm-bot's Introduction

Bee-Storm-bot

Discord.py Bot specifically made for Annus Team (or: Bee Storm) Discord server. Although the source code is open-source, in case you wanna run this bot on your server, you will need to make some changes, because of some 'hardcoded' server-specific things (in future updates - refactor, it may not be that bad):

  • IDs (roles, owner's, channels, etc.)
  • multiple-server issues (made for running on one server, multiple server run is untested, probably won't work and if so, will do real mess)
  • language (made for Czech server, so he speaks Czech)
  • commands (for example command '$svatky' applies only for Czech calendar, Czech Republic)

Discontinued

Development is discontinued. No one cares about this bot and I don't wanna do this anymore.

Start

Start with python (and modules discord, pytz) installed: python app.py

Online at 'Fly.io' hosting

  • Deploy (run or update): flyctl deploy
    • performed automatically on github push
  • Double messages fix (after deploy): fly scale count 1

Functions

  • compatible only with Annus Team Discord server (can be running on 1 server only)
  • simple JSON Database for storing stats
  • counting the number of predefined role mentions, bot mentions with commands showing stats, leaderboard
  • reacting to predefined messages, bot mention
  • simple commands (hello, time, repeat)
  • name day command (Who has Name day today/at specific day?)
  • daily message at noon (date, who has nameday or specific messages on Christmas, New Year's Eve)
  • non-aggresive censure
  • admin commands

Database

Using simple 'db.json' file and JSON format <=> python dict.

  • if the file content is entirely lost, bot can auto-restore the stats (slow process, server-specific feature)
  • storing predefined role mentions, reminders and bot data
  • corrupt database file will be sent in message and bot will perform auto-recovery of some data

Logs

Bot is recording it's activites and storing them into logfile.

  • if bot is currently restoring database, logging into file is disabled (log remains just in console)
  • possibility of server messages logging and internal logging

To be done

Some things need to be completed or updated:

  • Help message
  • Admin commands message
  • Source code related: remove unused global variables, code logic refactor, comments, etc. => refactor part 2

New (upcoming) features:

  • Dead room revival

bee-storm-bot's People

Contributors

horsecz avatar

Watchers

 avatar

bee-storm-bot's Issues

Admin commands

Currently admin can only shut down the bot - it would be nice make changes in the bot's behavior without needing to change the actual source code and rebooting bot (may be partly solved after #1 ), probably via command/s or some admin mode, for example:

  • change stored tags in database
  • alter or change bot behavior (start/stop logging, start/stop loop tasks - daily messages, facts, etc.)
  • some database related commands

Github command, complete reboot command

Github command should show (this) bot's github page.
Reboot command is currently commented and has issues, needed to change more things (and probably un-hard-code / refactor the source code, so this may work after #1 is done)

>2000 characters in messages

Currently, bot does not care about message length in any messages he sends. Not major problem, as bot usually send messages with the same length and in most cases it will be hard to meet 2000 characters limit, but there may be exceptions such as:

  • help message (currently very close to 2k, but since the text does not change, can be split into 2 messages easily)
  • reminders (text in single reminder is not limited by characters by bot, but rather limited by discord maximum 2k message limit - the problem may occur in reminder list, where all reminders are shown or in the actual reminding message)

Member changed name

If server member changes nickname (global), currently he/she will be just added as new member to database. However that is not how this should work, as all stats of this user will be lost.

Solution for this is currently:

  1. re-enter data manually in database
  2. start server-wide "recovery of database stats" (which takes more than hour)

Code Refactor

  1. Comments in mixed language
  2. Not enough commends somewhere
  3. Conventions are not consistent (fooBar, foo_bar, etc.)
  4. Everything is in one large 1500+ lines file, no modules
  5. Ineffective code (no classes - could work great here, repeated code blocks, etc.)
  6. Some features are hardcoded, not possible to change until you change the code

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.