Giter VIP home page Giter VIP logo

flandersbot's Introduction

Ahoy-hoy ๐Ÿ‘‹

flandersbot's People

Contributors

mitchellaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flandersbot's Issues

Discord bot verification

I will soon be starting the verification process of FlandersBOT, any updates regarding this process will be posted here. This issue will be closed if FlandersBOT is successfully verified. Verification process will begin once issue #8 is closed.

Adjust gif length for captions

Sometimes a gif is slightly too short in length, would be good to be able to extend a gif and/or adjust the start and end timestamps for a gif.

Update command documentation

The documentation for each command has gotten slightly out of date, both through the help commands, and in the README of this repository.

Store voting subscribers in DB

Vote subscribers/reminders are currently only stored in memory and are lost on restart, they should be stored in the DB and cached in memory to keep record of subscribers after restarts.

Steamed hams command

FrinkiHams was the original API used for displaying steamed hams captions using the ned steamedhams command. This API has unfortunately been removed, but the functionality of that command could still easily be recreated by grabbing a random caption between the start and end timestamp of the steamed hams skit.

Migrate any remaining json to db

There are still a few remaining uses of json by the bot that can easily be replaced with some new tables in the existing PostgreSQL database.

These json elements include:

  • Custom guild prefixes
  • Command statistics
  • Trivia questions/answers

It would likely be worth keeping the json file with trivia questions/answers due to its simplistic format. Alternatively, a script could be added to read from the json and insert the records into a DB for use by the bot. This would keep an easily readable open source record of all the trivia questions/answers, but eliminate the bots dependency on reading a json file for trivia matches.

Increase 79 character line limit

Due to the project having such a large number of message focused strings, I have increased the character limit to minimise excessive line wrapping caused by large message strings.

Bot vote statistics

Would be good to display the daily and/or monthly vote counts for the bot using one of the statistics commands.

Customize gif caption before posting

Currently, you can customize the caption of the previously posted screencap using the ned meme <caption> command. It would be good to also support specifying a custom caption at the same time as a search query.
For example: ned simpsons <search query> | <custom caption>

Support additional custom prefixes

Currently, FlandersBOT only supports a single custom command prefix per server. It would be good to be able to add/remove more custom prefixes.

Move event listeners to cog

Currently FlandersBOT has many event listeners in the main bot.py file, this means changes to these event listeners cannot be hot reloaded. Moving them to a cog will allow you to make changes to these listeners without restarting the bot.

Completely prevent duplicate prefixes

Although it is not behaviour that could be seen in the production environment, it is possible to duplicate prefixes in a dev environment with multiple bot instances running. Any generated lists of prefixes should be replaced with sets, and insert query should prevent duplicates. Using sets for the case insensitive prefix generation also makes more sense regardless.

Guild-specific rate limiting

Some guilds require more customizable rate limiting to prevent spam abuse using the bot. Ideally there should be an option to extend the rate limit for your server, user performing command will require admin/manage guild permissions.

Log missing votes with correct users

Currently, any missed votes are inserted into the vote_history table using null user ids.
It would be good to use the top.gg API to pull the latest 1,000 votes and prioritise updating any missing votes using these user ids rather than null ids.

Switch entirely to f-strings

Currently the code base has inconsistencies in its use of formatting strings due to the introduction of f-strings during the project. It would be good to switch all uses of string concatenation and .format() to employ f-strings instead.

Avoid presence change rate limits

Currently FlandersBOT updates its game presence with the new server count on guild join and remove, this could cause issues due to hitting rate limits, all presence updates should only be modified using the existing task for cycle_status_format to avoid any rate limits.

Support a guild trivia leaderboard

Currently there is only a global leaderboard for trivia performance, it would be good to add a guild-only leaderboard command, that lists the top 5 performers in each category in that users guild.

Move DB connection from on_ready()

Currently, FlandersBOT connects to the database using the on_ready() event, this fires multiple times and does not ensure that the db connection is established before querying any tables. The connection needs to be created before the bot connects.

Users are not notified of API page status errors

Many instances of:

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'FlandersBOT' object has no attribute 'LOGGING'

Occurring whenever an API page status error occurs, instead of notifying the user.

Slash commands

The Discord bot API now supports the option of slash commands, this use case fits FlandersBOT functionality pretty well and should be added, depending on requirements for bot verification.

Meme command allows quick reposting

Currently you can repost gifs using the ned meme command without a caption. Not sure if this is a critical issue, but it isn't intended functionality of the command.

Trivia cog.

Hey there, I've just tried out your bot and love the Trivia commands. Is it possible you could add a score count at the end of the trivia games? :)

Privacy options and data removal

Need functionality to request removal of all user data from the database. Another great feature would be an option to opt out of your username being shown in the leaderboard through the addition of some privacy options.

Possible privacy options:

0 - Public: Your account will be visible in the leaderboard for all users.

1 - Guild:
Your account will only be visible within the leaderboard in any discord servers/guilds you are a member of.

2- Private:
Your account will not appear in the leaderboard.

Handle missing "Use External Emojis" permission

Currently, if FlandersBOT is lacking permission to use external emojis, it displays the emojis as text in chat, such as :loading: for example. It would be good to fall back to a non-external emoji rather than display the text.

Shutdown command failing

Not a critical issue for the production environment, but a major issue during dev environments, the command ned shutdown is not always executing correctly.

Switch from dblapi.js to dblpy

Top.gg have made improvements to their API wrapper for python here: https://github.com/top-gg/python-sdk from when this project's index.js file was originally created.
The python SDK seems to now support voting webhooks and integrates with the discord.py commands extension very nicely, switching from node.js to python would make sense.

Trivia scoreboard not displaying

The scoreboard is no longer showing the performance of each participant at the end of trivia matches.

Errors currently occurring due to intents being required for current method of gathering member names. May require bot verification to solve.

Invalid use of cogs

There are two modules located in the cogs directory, trivia_category.py and tvshows.py, which are not valid instances of cogs, as they do not currently have a setup function.

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.