Discord-Bot-V3.6
ProfanityBlocker Release Notes |
Hello there,
We are glad to inform you that the latest version Discord-Bot-V3.6 of ProfanityBlocker is out. Below is the list of JIRA issues that were part of this upgrade.
Summary -
New Feature
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-179 | Support requests via bot | Allows Discord users to:
Additionally:
|
Done | Discord Bot | |
PB-172 | Gamification system | Civility Gamification System Overview The Civility Gamification System is an innovative feature designed to encourage positive interactions and foster a friendly community environment. By rewarding users for maintaining civil discourse, this system aims to create a more engaging and respectful atmosphere within your Discord server.
How It Works
Benefits
Leveling System
Commands
Implementation Details
Customization Server administrators might be able to customize various aspects of the system if people find this addition useful, including:
Conclusion The Civility Gamification System is a powerful tool for cultivating a positive community culture. By gamifying good behavior, it transforms the challenge of maintaining a respectful environment into an engaging, community-wide activity that benefits all members. The ability to check other users' stats adds a social and competitive element, further encouraging participation and civil behavior. |
In Review | Discord Bot | |
PB-59 | Filter channel threads | Since initial design in 2019 Discord didn't have channel threads and appears the bot doesn't see channel thread messages in the same way as normal on_message events.
|
Done | Discord Bot |
Improvements
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-169 | Slash commands support (w/ legacy prefix), ignoreme a premium command, new ignoredusers and filtermodel commands | Transition to slash commands, with backwards compatibility for legacy prefix commands. We also address the issue where ignoreme command was available to all (it is a premium command), added new ignoredusers and filtermodel command and spruced up commands with embeds, descriptions, fix ban command, etc |
Done | Discord Bot | |
PB-148 | Move Discord bot DM tracking regarding max requests to Redis storage | This helps with persistence so bot restarts will remember we messaged a guild owner about exceeding the plan limit. |
Done | Discord Bot | |
PB-138 | Redis and celery - Database optimisations for Discord bot | As a Discord server has a lot of messages, or if a extension-used licence is tried against a Discord server, several functions go to the DB and execute painful request history logic. The extension highlighted the importance of fixing these painful queries (simulating a busy Discord server)
We replace painful SQL queries for profane word count with caching and incrementing via Redis
Notes: |
Done | Discord Bot | |
PB-105 | Improve onboarding if added with a bot invite link and no account | Discord bot flow from Discord app directory allows users to add bots without website prompt. This issue aims to notify that they must visit our site if they want to manage the filter service with a Discord Oauth login link for our dashboard. |
Done | Discord Bot |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-153 | Quickfix: Refresh IFTTPB rules | Quick 5 minute refresh for rules. Improvements planned later on this issue. |
Done | Discord Bot, IFTTPB |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-145 | Simplify onboarding for discord |
|
Done | Dashboard, Discord Bot |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-90 | Better align filter and bot request history recording | Improve synchronization between the filter service and the Discord bot for recording request history. Previously, both the filter service and the Discord bot were independently creating request history entries, resulting in duplicate entries. Furthermore, the fields in these entries did not match, leading to inconsistencies in the displayed data in the request history views. To address this issue, we have implemented a solution. The filter service now includes the request ID it generates, and the Discord bot reads this ID to update the corresponding record with additional information, rather than creating a new entry in the database. This ensures better alignment between the filter service and the Discord bot in recording request history, eliminating duplicate entries and ensuring consistent data in the request history views. |
Done | Discord Bot, Filter |
Tasks
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-186 | Instantly create licences for new bot users | Improved onboarding by creating a service licence on the spot, bypassing our background job which can take a few minutes - our analytics found users adding the bot, immediately sending content into their channel (presumably to test) and removing it when nothing happened (because licence setup in the background hadn't finished/ran yet. |
Done | Celery, Dashboard, Discord Bot |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-61 | Migrate Discord.py from 1.7.3 to 2.x | V1.x API is EOL and will be dropped at the end of the year. Updating is necessary to make use of Threads/Forum type features as well. |
Done | Discord Bot |
Subtasks
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-56 | Lookup unprocessed messages and re-process them | This is necessary so that any disruption to a filter request is reprocessed if an error is returned from the service, or if we fail to process the message in a timely manner.
The on_message method in ProfanityBlocker.py checks if a message has been processed using the IsMessageProcessed method from the Database.py module. If the message has already been processed, it does nothing; otherwise, it continues processing the message. The IsMessageProcessed method in Database.py checks if a message has been processed in the database by retrieving the request time for the message and checking if it has exceeded the max processing duration. If the message has not been processed or has exceeded the max processing duration, it returns False; otherwise, it returns True. If the message ID doesn't exist in the database, it inserts the message ID and request time. Additionally, the MarkMessageAsProcessed method in Database.py marks a message as processed in the database by updating the processed flag and storing the request time for the message.
The logic in the reprocess_unprocessed_messages method respects the checks discussed earlier. When it fetches unprocessed messages and dispatches them using self.bot.dispatch('message', message), it effectively triggers the on_message method, which contains the checks for message processing. Therefore, the logic in reprocess_unprocessed_messages aligns with the message processing checks discussed previously. |
Done | Discord Bot | |
PB-46 | Long running OCR/message scans makes the bot loose heartbeat with Discord | Done | Discord Bot |
Bugs
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-178 | Periodic Refresh of IFTTPB rules can cause bot stalls | Quick 5 minute refresh for rules can cause stalls if ProxySQL rejects the query because of long execution time. |
In Review | Discord Bot, IFTTPB | |
PB-117 | IFTTPB: Incorrect Method Call in Discord Bot Leads to TypeError in ProfanityBlocker Module | Steps to Reproduce * Resolution: Modify the call to DoRule in the ProfanityBlocker module to use self.IFTTPB.DoRule, ensuring it is called on an instance of the IFTTPB class. This change provides the necessary context for the method to access its instance variables and execute correctly. * After: self.IFTTPB.DoRule(id=4, user=message.author, Message=message, Channel=message.channel) Additional files needed updating to use the instance of the class. This fix aligns with object-oriented programming principles, ensuring that instance methods are called on the correct object instances. It resolves the TypeError and allows the bot to handle profanity detection and rule enforcement as expected. |
Done | Discord Bot, IFTTPB |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-150 | Regression: Discord bot is sending the wrong licence to the service for the Discord server | Fix issue where the bot is sending the wrong licence key for the guild the message was sent in... |
Done | Discord Bot | |
PB-116 | Max_processing_duration too low for messages | Max_processing_duration was set incorrectly, leading to duplicate message reprocessing, especially with slower detailed word analysis. Another side effect was that image processing would not be done in time for the incorrectly set limit causing reprocessing of the image several times. |
Done | Discord Bot | |
PB-107 | Newly created licences aren't found by Discord bot | 105 error code will get us to refresh the global PBGuilds - there are better ways to do this - will optimise in another release |
Done | Discord Bot |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-144 | Discord bot can create guild entries twice and Dashboard throws an error if duplicate entries exist | Fix it. We now check if the guild already exists |
Done | Dashboard, Discord Bot |
Priority | Key | Summary | Description | Status | Component/s |
---|---|---|---|---|---|
PB-108 | Filter and bot should return an error code if licence does not exist, and message owner | We now return a service errorcode if the licence does not exist. The bot already had an error code for this - I also tweaked the message, used a different code. |
Done | Discord Bot, Filter |
Looking for more nitty gritty details? Take a look:
Number of issues resolved: 45 (including private issues)
Looking forward to hear your feedback.
Thanks,
Team ProfanityBlocker