mitchellaw / flandersbot Goto Github PK
View Code? Open in Web Editor NEWA discord bot with commands surrounding The Simpsons, Futurama and Rick and Morty and more!
Home Page: https://discord.gg/xMmxMYg
License: MIT License
A discord bot with commands surrounding The Simpsons, Futurama and Rick and Morty and more!
Home Page: https://discord.gg/xMmxMYg
License: MIT License
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.
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.
The documentation for each command has gotten slightly out of date, both through the help commands, and in the README of this repository.
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.
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.
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:
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.
Errors are currently experienced when using commands in DMs, due to calls to ctx.guild.id and message.guild.id without confirming if bot is in a guild.
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.
Would be good to display the daily and/or monthly vote counts for the bot using one of the statistics commands.
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>
Currently, FlandersBOT only supports a single custom command prefix per server. It would be good to be able to add/remove more custom prefixes.
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.
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.
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.
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.
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.
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.
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.
FlandersBOT is no longer responding in the channel when it lacks permission to perform a function in that guild.
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.
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.
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.
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.
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? :)
There is a bug in the trigger function that is incrementing all users loss counts regardless of whether they participated or not. Once the trigger is fixed, a script will be ran to fix all loss counts .
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.
The command ned update
should have a timestamp of the latest content update.
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.
Not a critical issue for the production environment, but a major issue during dev environments, the command ned shutdown
is not always executing correctly.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.