Art Prompts – Discord Bot Changelog

The Art Prompts Discord bot has been released on the 11th of February of 2020. Since then, it has changed a lot, as I, and the rest of the team, always strive to make the bot a bit better than before. Here is a summary of all the changes.

Version 1.3.1

Released on Friday the 16th of October, 2020.

This version implemented the OC and NSFW prompts into the main bot.

Previously, OC prompts were accessible on the official Art Prompts Discord server via its own bot. After 1.3.1, the main bot responds to !artprompt oc with an OC prompt on the main server, and with an invite to the server on all other servers.

NSFW prompts are a planned premium category for the revamped Art Prompts web app. To promote the category, we’re releasing around 50 – 100 free prompts to the Art Prompts NSFW Discord server. The main bot now responds to !artprompt nsfw on that server, while sending invites as a response to that command on other servers.

  • Implemented an !artprompt oc command, exclusive to the official AP sever.
  • Implemented an !artprompt nsfw command, exclusive to the official AP NSFW server.

Version 1.3.0

Released on Tuesday the 22th of September, 2020.

This is the first major update in several months. I implemented a ton of new features and changes.

A lot of the background code has changed – instead of lists of colors, emojis, and admin users being hardcoded into the bot, they’re now accessed through a safe cloud database. This allows us to update almost every variable in the bot without actually having to release a new version.

We changed the entirety of the !artprompt colors color list. Before, this list included around 200 color names. After this update, the list includes 139 colors, along with their hex codes. This will make it easier for users to look up the colors as they’re randomly selected from the list.

We scratched the previous Ad system (which sometimes inserted an ad for one of the other AP projects after a prompt), and replaced it with the new Hint system. While occasionally, the hint talks about other projects, there’s now a lot of usability tips for the bot.

These hints are also pulled from a cloud database, allowing us to add, remove, or change them at will.

New users of the bot often had trouble getting to know the specific category commands. While we’re hoping this will be partly solved by the aforementioned Hint system, we also implemented command synonyms. This is supposed to improve the user experience when they’re not 100% sure what the specific commands are.

For example, !artprompt person now works as if the user typed !artprompt people, while previously the bot would not respond to such a command at all.

Some servers were having trouble with the Help command, as well the Colors command – these commands respond with a Rich Embed, as opposed to all the other commands. If the bot doesn’t have the Embed Links permission, the bot does not respond to these commands at all.

I am planning to implement a fix for this issue in v1.3.2. However, I changed the invite link to automatically include this permission, so new servers do not face this problem.

  • Changed the background code to load many variables from a cloud database.
  • Changed the color list for !artprompt colors to be more user-friendly by including a hex code with each color.
  • Replaced the previous Ad system with a new Hint system.
  • Included 15 new command synonyms to improve the user experience for new users of the bot.
  • Changed the official invite link to include the Embed Links permission.

Version 1.2.8

Released on Monday the 20th of July, 2020.

On this day, the NSFW Premium category of prompts was released over on our Patreon. In order to promote this new feature (with over 100 lewd prompts), the bot got a new ad added into it (sharing the same 3% chance as all the other ads).

  • Added the NSFW add, which has a chance to appear as one of the ads when the bot returns a prompt. Each prompt has a 3% chance to display one of the ads.

Version 1.2.7

Released on Monday the 13th of July, 2020.

Adds a command to generate three random emojis. This command is !artprompt emoji, and it selects randomly from a list of 819 Discord-compatible emojis.

  • Added the !artprompt emoji command, which returns 3 randomly chosen emojis from a list of over 800.

Version 1.2.6

Released on Wednesday the 8th of July, 2020.

A very small update, redoing the help message into the Discord Rich Embed format.

  • Changed the help message of the bot to the Rich Embed format. It no longer links to this changelog, but it links to the author’s LinkedIn page, the bot’s webpage on Eledris, as well as the Discord server.

Version 1.2.5

Released on Tuesday the 2nd of June, 2020.

Most of the bot’s main features were done by this point. However, there were still some small-ish polish problems, and the code was far from optimal. In 1.2.5, I mainly implemented new quality-of-life features, and optimized the code a bit.

  • Changed the help message of the bot to be more readable. It also links to the bot’s webpage, the Art Prompts Discord server, and this changelog.
  • Optimized the code so it is easier to change the commands and the prefix in the future. It’s also a bit more readable.
  • Removed the automatic embeds of links to other prompts. The bot sends these links along with a prompt from time to time.

Version 1.2.4

Released on Monday the 1st of June, 2020.

Despite every page featuring the bot’s invite link having a command list, still more and more people were asking how to use the bot. For this reason, I changed the bot’s status “watching” message to say Watching for !aphelp.

  • Changed the bot’s status to help new users find the help message.

Version 1.2.3

Around this point, the bot reached an amazing number of server – 1 000. While this is absolutely amazing, it presented itself with a slight problem. Before, I was using the bot’s invite screen to monitor the number of servers the bot was on. This page gave you the exact number of servers.

Since reaching 1 000 servers, the page started rounding the number of servers, thus it wasn’t as reliable as before. For this reason, I coded in another admin-only command, that lets me see how many servers the bot is on.

Along with this small addition, I also optimized a large chunk of the bot’s code. I mainly rewrote the if/else statements in the code to switch-case statements, as they are much more effective and readable.

  • Added an admin-only command to see the number of servers the bot is currently on.
  • Optimized a lot of the bot’s code.

Version 1.2.2

I’m constantly adding new prompts into the bot’s database. Specifically, I add six new prompts every Friday. Before this version, the bot had to be restarted every time the database was updated, as the bot would only fetch the database on its startup. Version 1.2.2 adds an admin-only command that allows me to reload the bot’s database without restarting the whole bot.

I also had to be sure the memory leak from 1.2.0 was fixed, so I implemented another admin-only command, that allows me to see how much of the server’s memory is the bot using. Thankfully, the leak was fixed at this point.

For security reasons, I’m not disclosing the exact commands. However, it’s still impossible to use the command from any other Discord account than mine.

  • Added an admin-only command to reload the bot’s database of prompts without the need to restart the bot.
  • Added an admin-only command to say how much memory the bot is using.

Version 1.2.1

In the previous versions, the bot would tag the user when sending them the requested prompt. This feature was removed in 1.2.1, as users preferred the bot without the pinging.

  • Removed the bot pinging the user when sending them a prompt.
  • Minor bug fixes.

Version 1.2.0

At this point, the bot has grown enough for me to notice a memory leak. As I found out later, the discord.js library (which is pretty much the default JavaScript library for Discord bots) that I was using, caches a lot of data that it doesn’t really need.

This resulted in the bot amassing about 15MB of bonus memory every hour, which, needless to say, caused problems. At its worst, the memory leak caused the bot to crash or restart every 3 hours. Obviously, I had to do something about it.

After a lot of trial and error, and painstaking research, I was recommended a variation on discord.js, the discord.js-light library. It has most of the same functionality, but it doesn’t cache almost any data, saving a lot of memory in the process. Since version 1.1.1, the Art Prompts Discord bot has been running on discord.js-light.

  • Migration to the discord.js-light library, from the more memory-heavy discord.js.
  • Minor bug fixes.

Version 1.1.0

As I added the Colors category into the Art Prompts Android app (version 1.2.0), I decided it would be a nice addition to the bot, as well. Originally, the bot generated randomized hex codes. However, after a while of user-feedback, it was changed to a list of around 200 colors, such as “Amber“, “Charcoal“, or “Metal“.

  • “Colors” mode, along with a !artprompt colors command.
  • Minor bug fixes.

Version 1.0.0

This is the very first official version of the bot, released on the 11th of February 2020.

Since this changelog is only active since the version 1.2.4, the summaries before that might not be 100% accurate.