Changelog
Packages
- Updated
Discord.js
module from 14.6.0 to 14.7.1 - Updated
Mongoose
module from 6.7.2 to 6.8.0 - Updated
npm
from 8.17.0 to 9.2.0
Commands
- Added
/Player Search
and/Player Profile
./Player Search
allows the user to retrieve the career profile for a Battlenet user based on their Battletag#0001.- Emotes will only appear on the Support Server as servers handles the UseExternalEmojis permission differently.
/Player Profile
allows the user to search and retrieve a list of usernames (Battletags) containing the search string and the career privacy.
- Added
/Career
- For the first time, this will prompt the user to link their Battletag to the bot's database (through using
/Link
), else it will return the career profile of the Discord user based on the Battletag they provided for the Database or fail if the API or Database is unavailable.
- For the first time, this will prompt the user to link their Battletag to the bot's database (through using
- Added
/Link
,/Relink
and/Unlink
- These slash commands will allow the user to Link, Relink, and Unlink their Battletag#0001 that is associated with their Discord ID, these are stored in the bot's database, to be able to use the
/Career
Slash Command. Which is just a faster way of doing/Player Search
for locating the user's own career profile and is nothing more then a quality of life feature.
- These slash commands will allow the user to Link, Relink, and Unlink their Battletag#0001 that is associated with their Discord ID, these are stored in the bot's database, to be able to use the
- Updated
Winston
(Days until new cycle set from14d
to6d
days to reduce files)- I use Winston for logging separately from a hosting provider's standard logging, simply to have more control over any errors or warnings and how long I store them for debugging purposes. All files gets zipped after the day is over or max filesize is hit and a new is generated, and are then deleted after the new logger cycle starts.
Functions
I have a external file containing a few functions that I often use in multiple files, this saves me a lot of time and space. As they sync any new changes in real time, so I don't need to rely on having to restart the bot instance every time a new change is made. The changelog of these are only here so I can personally track it and may not serve any purpose to the common reader and in most cases won't even make sense unless you know the system I created.
- Improved the import and require statements for all functions
- Most commands and functions now require the cached version of functions.js
- Added 2 new functions
fileSearch
- Locating files based on directory and pattern, with more handy features like retrieving and automatically trimming the file ending. Simply makes the coding environment into a single liner and saves a few lines of code in the process.filePathBot
- Determines the bot's actual directory path, as some server providers have different directory layouts then my offline dev environment.
- Updated a few functions
- Updated
emoteCheck
function - Will now try to execute a check for channel perms first, then a role perms for everyone and bot role separately, if neither is present then returnfalse
- Updated
paginationEmbed
- Paginating embeds will now also take in both a thumbnail and setImage attachment, whereas before it could only take in one or the other, to ensure it knows whether or not its two attachments per embed, a boolean check is passed along as a parameter. Executes:(property) paginationEmbed: (interaction: Interaction, pages: EmbedBuilder[], timeout?: number, attachments?: any[], twoAttachmentPerEmbed?: Bolean) => Promise<any>
- Updated
toUpperCase
andtoUpperCaseAll
- It now properly recognizes unique letters (i.e á, ã, ç, í, etc) as word(s) and correctly applies a capital letter per word. - Updated
CustomLog
- Will now properly convert and format any console error logs to my local UTC without fail + Log the error to Winston the correct time and format output to match the file name.
- Updated