NPM Updates
All the DB-Script versions and change logs! The easiest way to see what happened on each update.
Updates are on a halt as we are working on (the now mandatory) v4. Feel free to join the Support Server and speak to any one of the Administrators or Developers for more info!

Update 3.3.1 (8-27-2021)

    1.
    $dm - Fixed a bug where function and data is sent in the channel where the command was executed, (oops).

Update 3.3.0 (8-27-2021)

    1.
    $member -
    <> Added tag option. <> Fixed a couple options that weren't executing properly. <> (Breaking change) Changed option names of a few.
    Option name changes for member function: isinguild => exists boostingtimestamp => booststamp boostedat => boostdate joinedtimestamp => joinstamp joinedat => joindate isbotabovemember => isbelowbot
    2.
    $userAvatar - Fixed bug: docs not defined (oops lol)
    3.
    $isBoosting - Fixed bug where always returns false.
    4.
    $dm - Function has been given a mandatory 2nd field to define the message content to dm the defined user. The absence of brackets can still be used to send the message to the command author.
    $dm[userID;message]
    $dm
    5.
    $convertFromBytes - New! Converts a number from bytes to one of the options. kb, mb, gb, or tb.
    6.
    $convertToBytes - New! Converts a number into bytes from one of the options. kb, mb, gb, or tb
    7.
    $hostRAM - New! Compact function pertaining to your host's RAM data with 11 options.
    8.
    $hostOS - New! Compact function pertaining to your host's Operating System data with 7 options.
    9.
    $hostCPU - New! Compact function pertaining to your host's CPU and processor data with 16 options.
    10.
    $hostDisk - New! Compact function pertaining to your host's Storage Disk data with 25 options.
    11.
    Reverted the fix for partial data from last update (See docs on version 3.2.0). It broke more than it fixed. We are working on the solution for it.
    12.
    $hostBattery - New! Compact function pertaining to your host's battery with 14 options.
    13.
    $client - Changed verified => isownerverified
    14.
    $getServerVar - Fixed annoying invalid docs link in error message (oops lol).
    15.
    Added support for COMPETING type bot status. By @Rickყ#2006
    16.
    $userBanner - New! Returns the banner image applied to a users profile (Nitro Premium users only). Otherwise the function will return undefined. By @Rickყ#2006
    17.
    $user - Added banner option to the compact function making a total of 14 options.
    18.
    $min - Returns the smallest number out of the numbers defined in the function.
    19.
    $max - Returns the largest number out of the numbers defined in the function.
    20.
    $vcMove - New! Moves a user from one voice channel to another. By @Rickყ#2006
    21.
    $vcKick - New! Kicks a user from a voice channel. By @Rickყ#2006
    22.
    $commandList - New! Returns a list of commands in your bot. By @Rickყ#2006
    23.
    $modifyRolePerms - Adds or removes permissions of a role in the current guild. By @Rickყ#2006
    24.
    $abbreviate - Gives a more accurate response. Fixed to the 2nd decimal point instead of the 1st and rounds the last digit after the decimal point.
    25.
    $and - Returns true if both conditions are true. Otherwise, returns false. By @Rickყ#2006
    26.
    $or - Returns true if one of the conditions are true. Otherwise, returns false. By @Rickყ#2006
    27.
    $extractAmount - Returns the amount of times the 2nd field sees the extracted content in the 1st field. By @Rickყ#2006
    28.
    $dbPing - Returns the time it takes for the bot to interact with the database in milliseconds (ms). By @Rickყ#2006
    29.
    $addReactions - Fixed bug where function will console error even if it executes properly. Should work as intended.

Update 3.2.0 (7-17-2021)

New:

    1.
    $uppercaseCount - Returns the amount of uppercase characters in the content.
    2.
    $lowercaseCount - Returns the amount of lowercase characters in the content.
    3.
    $adminCount - Returns the amount of bots, humans or total admins in a guild.
    4.
    $isString - Returns true if the content input is anything but a number. Otherwise, the function returns false. The complete opposite of $isNumber.
Fixed:
    1.
    A big issue for partial data. DB-Script now returns data from old messages, reactions and channels after reboots. Result: ReactionAddCommand and more are fixed.

Changed:

    1.
    $disconnect - Changed input acceptance. The function now only accepts guildID to disconnect the bot from a voice channel in another guild, or the absence of brackets to disconnect the bot from a voice channel in the current guild. The function also now auto-detects if the bot is in a voice channel and returns an error if it is not. Catch with $voiceID[$client]
    2.
    $member - Added boostcount and tag options and changed option names of a few.
    Option name changes: isinguild => exists boostingtimestamp => booststamp boostedat => boostdate joinedtimestamp => joinstamp joinedat => joindate

Update 3.1.1 (7-12-2021)

New:

    1.
    $toCringecase - Alternates character case for each character. Contributed by Ricky
    2.
    $guildChannels - Returns all of the channels in a guild.
    3.
    $guildCategories - Returns all of the categories in a guild.
    4.
    $guildEmojis - Returns all of the emojis in a guild.
    5.
    $guildRoles - Returns all of the roles in a guild.
    6.
    $abbreviate - Abbreviates large numbers with a symbol.
    7.
    $isBoolean - Returns true if the input is a boolean.
    8.
    $tts - Sends a spoken message to a channel.
    9.
    $codeblock - Puts the content in a codeblock.
    10.
    $codeblockMessage - Puts the content of an existing message in codeblock.
    11.
    $italic - Italicizes the content in the brackets.
    12.
    $bold - Bolds the content in the brackets.
    13.
    $spoiler - Spoils the content in the brackets.
    14.
    $strikethrough - Puts a strikethrough in the content in the brackets.

Fixed:

    1.
    $eventCount => $eventsCount
    Fixed typo in source code and changed function name. (it was never fully changed with version 3.0.0 oops)

Update 3.1.0 (7-7-2021)

Fixed:
    1.
    $getFromEmbed - Fixed a few bugs pertaining to uncaught errors & Added 5 new options
    2.
    $onlyIf - Fixed fatal bug resulting in the function completely breaking when more than 1 $onlyIf is used in the command.
Updated:
    1.
    $giveRole - Added an optional field for guild ID in the 3rd field and swapped positions for user and role! Function will need to be rewritten!
    2.
    $takeRole - Added an optional field for guild ID in the 3rd field and swapped positions for user and role! Function will need to be rewritten!
    3.
    $hasRole - Added an optional field for guild ID in the 3rd field and rearranged fields. Function will need to be rewritten!
    4.
    $hasRoles - Added a mandatory field for guild ID in the 2nd field and rearranged fields. Function will need to be rewritten!
    5.
    $uptime - Changed the output format. Now the function will not display the extra if not online long enough. (no real need for $replaceText anymore, you'll see.)
    6.
    $textBetween - New function that returns the text content between two words. By @Rickყ
    7.
    $onlyAdmin - Optionally removed brackets for silent error.
Removed:
    1.
    $getMessage - Removed in favor of $msg compact function.

Update 3.0.4 (6-19-2021)

    1.
    $createRole - Added an optional field for guild ID in the (6th) final field.
    2.
    $createWebhook - Fixed channel cache issue. ChannelID can be fetched from any guild the bot is in.
    3.
    ReactionAddCommand & ReactionRemoveCommand - Added 5 important placeholders.

Update 3.0.3 (6-17-2021)

Fixed console error guild.channels.fetch() is not a function for the following events:
    1.
    2.
    6.
Other fixes
    1.
    $If - Almost unnoticeable adjustments.

Update 3.0.2 (6-16-2021)

    1.
    $userAvatar - Updated fields again! Removed the dynamic property field and function is perpetually dynamic. Fixed bug listed in #known-bugs
    2.
    $authorAvatar - Updated fields! Removed the dynamic property field and function is perpetually dynamic.
    3.
    $if - Link changed to conditions in the package(edited)
    4.
    $userID - Fixed bug resulting in console error ReferenceError: r is not defined
    5.
    $user - Fixed option istyping returning undefined when the user is not typing.
    6.
    $member - Added 1 option isboosting

Update 3.0.1 (6-15-2021)

    1.
    $guildNames => $sortGuildNames
    2.
    $queue - Fixed cache issue
    3.
    $userAvatar - Removed the dynamic property field.

Update 3.0.0 (6-14-2021)

Code breaking function name changes!
    1.
    $findEmote => $findEmoji
    2.
    $emoteCount => $emojiCount
    3.
    $serverAvailable => $guildAvailable
    4.
    $serverBoostCount => $guildBoostCount
    5.
    $serverBoostLevel => $guildBoostLevel
    6.
    $serverContentFilter => $guildContentFilter
    7.
    $serverCooldown => $guildCooldown
    8.
    $serverCount => $guildCount
    9.
    $serverFeatures => $guildFeatures
    10.
    $serverIcon => $guildIcon
    11.
    $serverIDs => $sortGuildIDs
    12.
    $serverLeaderboard => $guildLeaderboard
    13.
    $serverName => $guildName
    14.
    $serverRulesChannel => $guildRulesChannel
    15.
    $serverUpdatesChannel => $guildUpdatesChannel
    16.
    $serverVanityURL => $guildVanityURL
    17.
    $serverVanityUses => $guildVanityUses
    18.
    $serverVerificationLvl => $guildVerificationLvl
    19.
    $getServerInvite => $getGuildInvite
    20.
    $infoFromServers => $infoFromGuilds
    21.
    $onlyForServers => $onlyForGuilds
    22.
    $eventsCount => $eventCount

Updated:

    1.
    $cmd - Can define function without brackets to return the command name.
    2.
    $client - Can define function without brackets to return the client ID.
    3.
    $msg - Can define function without brackets to return the message ID of the command message.
    4.
    $userAvatar - Can define function without brackets to return the command author's avatar. Same as $authorAvatar for diversity
    5.
    $userID - Can define function without brackets to return the command author's ID. Same as $authorID for diversity
    6.
    $emojiCount - Changed name to $emojiCount from $emoteCount and added the option total and all to return the total amount of cached emojis from all guilds your bot is in. Both options do the same thing.
    7.
    $createChannel - Can define function without brackets to create a default text channel.
    8.
    $findEmoji - Changed name to $findEmoji from $findEmote.
    9.
    $djsEval - Automatically defines the fs, ms, moment, db modules so no need to define it yourself.
    10.
    $addAttachment - Added a second field to define a custom name for the image attachment. If left blank or 2nd field does not exist, the function will randomize the name.
    11.
    $color - Leave brackets empty for a random color. No longer have to capitalize RANDOM to get random color. Can be lowercase too.
    12.
    $voiceID - Can define function without brackets to return the voice ID of the command author. Still returns undefined if user is not is a voice channel.
    13.
    $cloneChannel - If 2nd field is defined as yes or true, the function will return the ID of the newly cloned channel.
    14.
    $colorRole - Now defines 3 fields.
    15.
    $deletecommand - Compatible without brackets to immediately delete the command
    16.
    $emoji - Now has 3 fields! Added 1 option.

Fixed:

    1.
    $client - Fixed bug that arose last update: ReferenceError: result is not defined (oops lol) - Also cleaned up source code for the function a little.
    2.
    $channelSendMessage - Fixed bug resulting in the function not sending plain text message responses and not sending messages to other channels.
    3.
    $customCommand - Works as intended. Click on the function name to see more.
    4.
    $customCommandList - Works as intended. Click on the function name to see more.
    5.
    $djsEval - Fixed function replacing A2008a with [ and A2008E with ] when evaluating brackets.
    6.
    $shutdown - Now follows all limiters as it should and accepts brackets for a feedback message before shutting down.
    7.
    $randomUserReaction - Fixed cache problem. Function will still work as intended after bot reboots.
    8.
    $botInGuild - Fixed crash when an un-cached or incorrect guild ID is defined.
Added:
    1.
    $eval - Evaluate DB-Script code in a Discord channel.
    2.
    $guild - Added 6 new options
    3.
    $customCommandExists - Returns true or false
    4.
    $client - Added 9 new options.
    5.
    $member - Compact function with 17 options.
    6.
    $usersWithTag - Returns a list of users with the same discriminator as the input.
    7.
    $usersWithTagCount - Returns the amount of users with that same discriminator.
    8.
    $usersWithNickname - Returns a list of users with the same nickname as the input.
    9.
    $usersWithNicknameCount - Returns the amount of users with that same nickname.
    10.
    $reboot - Reboots your bot with an option to return feedback from the bot before rebooting.
    11.
    $If - If conditions meet in the 1st field, the code in the 2nd field will execute.
    12.
    ReactionAddCommand - An event that executes when a reaction is added to a cached message.
    13.
    ReactionRemoveCommand - An event that executes when a reaction is removed from a cached message
    14.
    ***$parseToMS - Converts the time provided into milliseconds - (eg: 24h = 86400000).
    15.
    ***$parseFromMS - Converts the milliseconds provided into a human readable format - (eg: 6000 = 6 seconds)
    16.
    $allVars - Returns the names or values of all the variables in your bot. Also returns both. - By @BetaDv from back in late April 2021 and was never added. I made it compatible with no brackets, implemented the 3 options and killed a few bugs to make it work as intended.

Fixed caching problem for the following functions:

Fixed cache problem means that even when the bot reboots, the bot can still retrieve the required data after the reboot. Most importantly used when functions are interacting with events. This fix kills a truck-load of bugs!
    1.
    $activity
    2.
    5.
    8.
    10.
    12.
    $dm
    13.
    14.
    15.
    16.
    $getRoleColor - And added an optional 2nd field for guild ID.
    17.
    18.
    $highestRole - And added optional 2nd field for guild ID.
    19.
    $isBoosting - And added an optional 2nd field for guild ID.
    20.
    21.
    23.
    $isNSFW
    24.
    $isPinned
    26.
    $lowestRole - And added an optional 2nd field for guild ID.
    27.
    $memberRoleCount - And added an optional 2nd field for guild ID.

Added Music Functions:

MUSIC IS IN BETA AND WE (Developers) ARE RELYING ON YOUR FEEDBACK OF FOUND BUGS SO WE CAN PROMPTLY FIX THEM!
Must install all 3 of the following dependencies yourself before attempting to run any music functions or you will receive console errors! This is to reduce the package's ram usage if you are not using music: 1. npm install ffmpeg-static 2. npm install @discordjs/opus 3. npm install ytdl-core
    1.
    $play - Play a song via YouTube link.
    2.
    $stop - Stops all music and removes all songs from queue.
    3.
    $queue - Returns all the songs playing.
    4.
    $resume - Resumes playing the currently paused song.
    5.
    $pause - Pauses the currently playing song.
    6.
    $queueLength - Returns the amount of songs listed in the queue. Returns 0 if no songs are playing.
    7.
    $trackInfo - Returns info about the currently playing song with 6 options.
    8.
    $volume - Sets the volume for the currently playing audio.
    9.
    $skip - Skips the currently playing song.
    10.
    $loopSong - Loops the current song to be played again.
    11.
    $loopQueue - Loops the entire queue to be played again.
    12.
    $isPaused - Returns true if the song is paused. Returns false if the bot is not playing any audio. Returns undefined if the bot is not connected to a voice channel.
    13.
    $voice - Compact function pertaining to voice channels with 21 options.
    14.
    $disconnect - Disconnects the bot from a voice channel.

Update 2.6.2 (5-12-2021)

Added:

    1.
    $round
    2.
    $roundUp
    3.
    $truncate
    4.
    $power
    5.
    8.

Fixed:

    1.
    $status

Updated:

    1.
    $memory

Update 2.6.1 (4-27-2021)

Added Features:

    1.
    {execute:} is now acceptable in the 3rd field of $replaceText
Fixed:
    1.
    All new asynchronous errors that popped up on 2.6.0

Update 2.6.0 (4-26-2021)

New Functions:

    2.
    *Added {attachment} to 2nd field embeds (currently, this cannot be used alone in a command. Must be sent with some sort of data or else nothing will be sent.)
    3.
    6.
    $fileSize
    12.
    14.

Changed:

    1.
    $client - Rewritten with more details below: - Changed the status option to presence - Added presence option(same as status) - added lastmcid - Short version of lastmessagechannelid - Added lastmid - Short version of lastmessageid - Added discrim - Short version of discriminator

Fixed:

    1.
    $createChannel - Fixed bug giving errors when 1st or 2nd field is not defined. - 1st field defaults to new channel. - 2nd field defaults to text channel type.
    2.
    *bot.userUpdateCommand - Now allows $getServerVar in event name and sees all placeholders
    3.
    *bot.roleCreateCommand - Now allows $getServerVar in event name and sees all placeholders
    4.
    *bot.roleDeleteCommand - Now allows $getServerVar in event name and sees all placeholders
    5.
    *bot.channelCreateCommand - Now allows $getServerVar in event name and sees all placeholders
    6.
    *bot.channelDeleteCommand - Now allows $getServerVar in event name and sees all placeholders
    7.
    *bot.channelUpdateCommand - Now allows $getServerVar in event name and sees all placeholders
    8.
    *bot.emojiDeleteCommand - Now allows $getServerVar in event name and sees all placeholders
    9.
    *bot.emojiCreateCommand - Now allows $getServerVar in event name and sees all placeholders

Functions below now allow Executables in error fields:

    1.
    5.
    $cooldown
    6.
    $enabled
    8.
    9.
    $onlyBotPerms - {perms} can now be used more than once in the error message.
    13.
    16.
    19.
    $onlyNSFW
    20.
    $onlyPerms - {perms} can now be used more than once in the error message.
    22.
    $suppressErrors - Now also allows the absence of brackets for silent suppression.

Added:

    1.
    *bot.Status now has a status property. Sets the bot's presence. "dnd", "idle", "online", "invisible"
    2.
    *isedited, old options have been added to $msg
    3.
    **32 more placeholders to onGuildUpdate. (16 old and 16 new)
    4.
    Added documentation to the already existing function, $findInApi

Update 2.5.0 (3-24-2021)

New Events:

    1.
    BanCommand - Triggers when a member is banned in a guild the bot can see.
    2.
    UnbanCommand - Triggers when a member is unbanned in a guild the bot can see.
    3.
    RateLimitCommand - Triggers when the bot becomes rate limited by the API. Placeholders will return data for you.
    4.
    GuildUpdateCommand - Triggers when a guild name or icon is updated in a guild the bot can see.

New Functions:

    1.
    $eventsCount - Returns the total number of events the NPM has on the version your bot in on.
    2.
    $sendCrosspostDM - Sends a message to multiple users DMs. You are held accountable for your own actions!
    3.
    $messageExists - Returns true if the message ID exists in the current or given channel. Otherwise bot returns false.
    4.
    $findNumbers - Returns all the numbers from the message.
    5.
    $customEmojis - Extracts and returns all the custom emojis from the message or arguments (if any). Does not work with default emojis.
    6.
    $defaultEmojis - Extracts and returns all the default emojis from the message or arguments (if any). Does not work with custom emojis.
    7.
    $allWebhooksCount - Returns the total number of webhooks in the current guild. Define a channel to return the webhook total in that channel. Define another guild ID to return the webhook total in that guild.(bot must be in guild).
    8.
    $isCategory - Redundant because you can make this check yourself in dbscript but yea...
    9.
    $voiceChannelCount - Returns the total number of voice channels in a guild.
    10.
    $fileCount - Returns the number of files in a folder. Supply the file path. Path always starts with ./ defined as the home folder, regardless if you're using a command handler for easier use. You're welcome.

Updated Functions:

    1.
    $memberRoles - Allows an optional 2nd field to mention the group of roles instead of just the names.
    2.
    $userAvatar - Made image dynamic if no parameters are defined.
    3.
    $channelCount - Turned into a compact function with 5 options. (No you dont' have to recode your bots. No breaks will occur!)
    1
    $channelCount - current guild total data
    2
    $channelCount[] - current guild total data
    3
    $channelCount[;] - current guild total data
    4
    $channelCount[guildID;] - current guild total data
    5
    $channelCount[guildID] - current guild total data
    6
    $channelCount[;option] - current guild option data
    7
    $channelCount[guildID;option] - optional data
    Copied!

Update 2.4.0 (3-15-2021)

8 New Functions:

    1.
    $categoryCooldown - A command cooldown that affects all channels in an entire guild category.
    2.
    $modifyChannel - Modifies a channel with 7 editable properties. Acts much like a compact function.
    3.
    $getMessageVar - Returns the value of a message variable.
    4.
    $setMessageVar - Sets a value to a variable assigned to a message.
    5.
    $resetMessageVar - Resets all message variables data in the guild the command is executed in.
    6.
    $isNegativeNumber - Returns true if the number is a negative number. Returns false if the number is a positive number. Returns undefined if the content is not a number.
    7.
    $setRolePosition - Sets the position of a role in the guilds role list.
    8.
    $lastMessageURL - Returns the URL of the last message of the command author or specific user.

7 New Events:

    1.
    bot.EmojiCreateCommand - An event that fires when an emoji is created in a guild.
    2.
    bot.EmojiDeleteCommand - An event that fires when an emoji is deleted from a guild.