Skip to content

Releases: aoijs/aoi.js

6.9.0

13 Oct 21:17
cd30654
Compare
Choose a tag to compare

Added

  • Added entitlements

    • create, update and delete events
    • 7 new functions related to premium features!
    • $isConsumed, $consume, $createTestEntitlement, $deleteTestEntitlement, $oldEntitlementData, $newEntitlementData, $hasPremium
    • ability to send premium buttons!
  • Support for app emojis

    • ability to edit, update and delete app emojis
    • 3 new functions related to them,
      • $createAppEmoji, $deleteAppEmoji, $editAppEmoji
    • $customEmoji now supports sending app emojis!
  • $getAvatarDecoration, returns an (static) image of the users' avatar decoration

  • $deleteCacheData, deletes data created with $createCacheData

  • $awaitComponentsUntil, "temporary" interaction command to will expire after a given time

  • $cloneEmbed, simply clone your embeds instead of having to copy and paste your whole code!

  • $disableComponents, easily disable any components without having to edit the whole message!

  • $getTimeout, return all active timeouts created via $setTimeout!

  • $randomEmoji now allows you to specify the return type.

  • $usersBanned & $guildRoles now allows you to specify more return types and create lists using JSON.

  • Improvements to $httpRequest, now able to return HTML content, via #639

  • Updated typings, via #647

  • Added "endCmd" to most loop commands

  • Added "index" to most loop commands, meaning you can now use the $index function to return the current index of the loop

  • Added $switch[] function, thanks @Cyberghxst

  • Added $getGuildBoosters

  • Added $voiceMemberCount

  • Added $setVoiceStatus

  • Added $getAutomodRule

  • Added $getAutomodRules

Fixes

  • Fixed $setTimeout not executing after bot restart in some edge-cases!
  • Fixed $isInteger returning always false
  • Fixed $isValidImageLink throwing an error instead of returning false
  • Fixed several parser bugs
    • Unable to attach multiple images
    • Unable to use custom emojis in buttons in the string format
    • Parser is now less strict and doesn't instantly break
  • Fixes member events returning invalid data
  • More minor bug fixes
  • Fixes reaction events
  • Fixes $awaitMessages not having embed support
  • Fixes emoji parsing in all functions & parser
  • Fixes event data not being present for member events

6.8.5

09 Jul 16:38
0a20d4d
Compare
Choose a tag to compare

Added:

  • $discordTimestamp[timestamp;flag] - returns timestamp by default, can be altered.

Interactions functions

  • $interactionLocale
  • $interactionPremium
  • $isInteractionDeferred
  • $isInteractionRepliable
  • $isInteractionReplied

Fixed:

  • Fixed $stopTimeout max duration.
  • Fixed $addSelectMenuTo action row.
  • Fixed $arrayPush returning number
  • Fixed $clear incorrect usage, now updated $clear[channelID;amount;returnCount;bots;unpinned;words;user].
  • Fixed nodejs checker.
  • Fixed AoiWarning.

Improvements:

  • $isSelectMenuInteraction updated to new methods, no parameters changes.
  • Now using @aoijs org for NPM + Github. (Extensions have been updated)

Removed:

  • Removed deprecation console log of $if: old. (You can still use $if: old method)
  • Removed voice constant.
  • Removed deafen permission (Use createinstantinvite
  • Removed mute permission (Use mutemembers)
  • Removed ManageEmojisAndStickers (Use ManageGuildExpressions)
  • Removed createinvite permission (Use createinstantinvite)

6.8.0

30 May 18:36
8cb43f1
Compare
Choose a tag to compare

Breaking Changes

⚠️ You cannot use an older aoi.db version lower than 2.3.x, as it will break your entire data since new scheming, always make a backup.

Interaction Changes

  • $interactionReply[content;allowedMentions;ephemeral;returnId]
  • $interactionDefer[ephemeral]
  • $interactionFollowUp[content;ephemeral;returnId]
  • $interactionEdit[content;allowedMentions]
  • $interactionUpdate[content]

$clear updated

  • Added {words} filter in $clear
    • New usage: $clear[channelId;amount;{bot:true} {unpinned:true} {users:userid,userid} {words:only this,content,will,be,deleted};returnCount]

All automod functions are now split up into multiple.

  • $createAutomodRule[guildId;name;enabled;reason]
  • $getGuldAutomodNames[guildId;separator]
  • $setAutomodActions[type;channel;durationSeconds;customMessage]
  • $setAutomodAllowList[...words]
  • $setAutomodExemptChannels[...channels]
  • $setAutomodExemptRoles[...roles]
  • $setAutomodKeywordFilter[...words]
  • $setAtomodMentionRaidProtection[enabled]
  • $setAutomodMentionTotalLimit[limit]
  • $setAutomodPreset[...presets]
  • $setAutomodRegexFilter[...regex]
  • $setAutomodType[type]

Added

New debug option

Allows for debugging purpose of your Client.

+    debugs: {
+        interpreter: true
+    }
  • #576 type option in $commandsCount
  • #604 $addMessageFlags[channelId;messageId;...flags]
  • #604 $setMessageFlags[...flags]
  • #604 Added flags parser option `{flags:}
  • #604 Added {allowedMentions} parser
  • #596 MessagePollVoteAdd & MessagePollVoteRemove events
  • #595 SendPolls permission
  • #595 / 1be332a $setClientBanner[bannerUrl]
  • #595 $createPoll[channelId;question;duration;allowMultiselect;...answers]
  • #595 $endPoll[channelId;messageId]
  • #595 $getPollVotes[channelId;messageId;pollId;format;separator]
  • #593 $removeComponents[channelId;messageId;...customIds]
  • #576 $addButtonTo[channelId;messageId;index;label;style;customId;disabled;emoji]
  • #576 $addSelectMenuTo[channelId;messageId;index;type;customId;placeholder;minValues;maxValues;disabled;...options]
  • #576 $getArray[name] returns the raw array created via $createArray[]
  • #576 $emojiName[emojiResolver] returns the emoji name
  • #576 Added defer option for {interaction:defer?}
  • #570 $arrange[type;separator;...numbers] arrange numbers after given format
  • #570 $emojiURL[emojiURL] returns the emoji URL of an given emoji
  • #551 Added {reply:messageId:mentionUser?} parser
  • 5cb768d Added mutemembers & deafenmembers to match discord.js (old permission names still exist!)
  • ca93a54 $isSelectMenuInteraction
  • ca93a54 $interactionAttachment[option] returns attachments passed via slash options
  • 6452125 $timeoutList[format;separator] returns all timeouts saved in the database
  • f5c4568 $advancedReplaceText[text;...replacements], better version of $replaceText[]
  • 83134bb $test[text;pattern;flag], test if the regex is truthy
  • 059a410 $clientGuilds[format;list;separator;sort] returns all client guilds
  • b382311 $clientShards[format;separator] returns all client shards
  • 3cdb11f $deleteGuild[guildId] deletes a given guild
  • 92820a1 $createGuild[name;icon;returnId] creates a new guild
  • 34545fb $disconnectUser[guildId;userID;reason] disconnects a user from a Voice Channel
  • 5d4d00e $hasComponents[channelId;messageId;type]
  • 763db49 $getComponentCustomId returns the interaction custom id
  • 8b3e368 $memberPremiumSince[memberId;guildId]
  • 31284b9 $channelPosition[channelId]
  • 3fc5e83 $channelLastPinTimestamp[channelId]
  • f932cfd $channelLastMessageId[channelId]
  • ba7119c sub_command, sub_command_group command options
  • 07aa710 $comment[comment]
  • b80bd6a $getSelectMenuValues[value;separator] returns selected select menu options
  • 337376d $createGuildTemplate[guildId;name;description;returnCode]
  • 337376d $deleteGuildTemplate[code]
  • 337376d $getGuildTemplate[code;property]
  • 337376d $hasGuildTemplate[guildId]

Removed

  • #595 $addApplicationCommandPermissions
  • #595 $removeApplicationCommandPermissions
  • #595 $setApplicationCommandPermissions
  • #593 $deleteButton[]
  • 70e1cdf {selectMenuOptions}, use {stringInput}
  • 70e1cdf Removed yes/no support for parser functions (use true/false)
  • 1c01dee $awaitComponentsUntil, use $awaitComponents instead

Fixed

  • #604 Fixed typo in $createApplicationCommand rendering it unable to limit commands to guilds/Direct Messages
  • #604 Fixed $clear not returning the actual deleted messages
  • #600 memberChunk event having a typo causing a crash
  • 0da8957 Fixed $isInteger returning falsy values
  • #597 Fixed $setTimeout not executing after restart, and values not deleting from the database
  • #596 Fixed $getObjectProperty having a left-over console.log()
  • #576 Fixed $stopTimeout targetting the wrong database table
  • #576 Fixed $emojiExists not working correctly for unicode emojis.
  • #576 Fixed $isUnicodeEmoji not covering all ranges
  • #576 Fixed $jsonRequest returning minified json objects
  • #576 Fixed {button:} splitting urls causing it to break
  • #570 Fixed $hour returning one digit long values
  • #570 Fixed $minute returning one digit long values
  • #570 Fixed $second returning one digit long values
  • #567 Fixed $modifyRolePerms not modfying role permissions, (thanks @berticulousnert!)
  • ca93a54 Fixed $isComponentInteraction not working
  • a998471 Fixed $createThread unable to create threads within forum channels
  • 2ba9392 Fixed $reactionCollector returning the incorrect author
  • 5728f55 Fixed $awaitComponents not working
  • 5b7eff8 Fixed $fetch returning stringified objects
  • 9f7bdae Fixed $creationDate not working for users who are sharding, now uses SnowflakeUtil
  • b617d99 Fixed {edit} parser
  • 46ddfdf Fixed error parsing in cooldown functions
  • 216e3fb Fixed $awaitMessageReactions
  • 9012c96 Fixed $clear having a maximum of 99 instead of 100

Minor Changes

  • a6721d8 $updateCommands now supports sharding

6.7.1

24 Jan 05:48
Compare
Choose a tag to compare

Fixed:

  • [e82a294] Fixed check for threadmembersupdate commands causing a crash.
  • [28eb107] Fixed reply parser.
  • [c532789] Bumped $channelSendMessage to use aoiFunc.
  • [17f2037] Fixed $sendMessage return ID.

6.7.0

23 Jan 05:00
Compare
Choose a tag to compare

Features:

Changed:

  • [b961a76] Deprecated {selectMenuOption:}, begin to use {stringInput:}
  • [1cebc66] Bumped permissions constant.
  • [d762aad] Bumped node v20.
  • [58252bf] Fixed size to length.
  • [de98575] Updated $userLeaderboard as like other lb.
  • [23d6a16] Updated $guildLeaderboard as globalLb.
  • [cb7604c] Updated $isValidHex.
  • [edd6d64] Updated $stringEndsWith.
  • [4eaf2aa] Updated $stringStartsWith.

Fixed:

  • [d5524ed] Fixed {interaction} needing true as argument
  • [b198589] Fixed $setTimeout condition being faulty.
  • [d971e95] Fixed bug causing brackets to duplicate.
  • [b4436f5] Fixed an issue with $clear command.
  • [6293b7f] Fixed leaderboard functions.
  • [ba9ea93] Fixed $expandNumber.
  • [573b6ab] Fixed dmPermissions support for $createAppCmd.
  • [802ab7c] Fixed $emojiCount default options and await.
  • [5c269ca] Fixed returnid.
  • [5a2d9f9] Fixed {execute} parser.
  • [51b2d0a] Fixed $getobjectvalues.
  • [59b6150] Fixed $getobjectkeys.
  • [3843266] Fixed $getObjectProperty.
  • [b162393] Fixed invalid error.
  • [d33ef47] Fixed $reactionCount returning invalid emoji error when the reaction count is 0
  • [d33ef47] Fixed all emoji parsing
  • [d33ef47] Fixed parser {file:} and removal of yes/no support as well as {fields:}
  • [d33ef47] Fixed $addSelectMenu not accepting emojis.
  • [d33ef47] Fixed $getCooldownTime.
  • [d33ef47] Fixed $getObjectProperty.
  • [a76346c] Updated loadCommands type.
  • [eeb828d] Updated handleResidueData.
  • [0fc11eb] Fixed notp.

6.6.1

03 Dec 19:37
Compare
Choose a tag to compare

Fixed

  • Fixed aoi.db disabled by default.

6.6.0

03 Dec 06:30
Compare
Choose a tag to compare

Breaking Changes:

Now officially supporting @akarui/aoi.db v2.0.0

There is now a new setup of using aoi.db v2.0.0.

Setup

    database: {
        type: "aoi.db",
        db: require("@akarui/aoi.db"),
        dbType: "KeyValue",
        tables: ["main"],
        securityKey: "a-32-characters-long-string-here",
    }

Data will automatically be handled to transfer onto v2.0.0.

⚠️ ALWAYS BACKUP BEFORE UPDATING

⚠️ aoi.db will properly backup data for aoi.js, resulting backing data hourly for cooldown and timeout.

Changes:

  • $clear parameters have changed to following: $clear[channelID;amount;filters;returnCount]. (channelID is now required first)

Filters of $clear:

- unPins
+ notpinned
- bot
+ bots

Added $clear users filter.

  • Renamed $isVerified to $isGuildVerified.
  • Renamed i$sPartnered to $isGuildPartnered.
  • Updated $customEmoji to use proper method.
  • Updated $shard to return an error properly.
  • Improved customboxedmessage component.

Added:

  • Added disableAoiDB method onto Client Options to disable database and related fetching/backing up.
  • Added media channel type.
  • Added support for all types of select menus.
  • Added support to disable all mentions in interaction responses.
  • Added $charCount find option.
  • Added $bulk separator option.
  • Added $getGuildTemplate.
  • Added $getGuildTemplates.
  • Added $isBotVerified.
  • Added $hasAttachment.
  • Added $randomShuffle.
  • Added $editButton.
  • Added $sendSticker.
  • Added $resolveStickerID.
  • Added $awaitExecute.
  • Added $findGuild.
  • Added $getMentions.

Fixed:

  • Fixed arrayshuffle method.
  • Fixed bot.status not looping correctly.
  • Fixed invalid thread types.
  • Fixed invalid parameters for $createThread.
  • Fixed error when user has no roles in lowest/highest role functions.
  • Fixed error in $broadCastEval when Client Shard is not initialized.
  • Fixed $userID.
  • Fixed $fetchClientValues.
  • Fixed $bulk.
  • Fixed $resolveEmojiId returning emoji string instead of id.

6.5.6

27 Sep 18:19
Compare
Choose a tag to compare

Added

  • Extensions are now on README to be displayed. (Pull request to add your extension!)

Improvements

  • Incorrect events provided will properly throw error.
  • timeout won't crash if database method not provided.
  • variables method will properly throw error if database method not provided.
  • status method will prevent startup if wrong method provided.
  • createFunction no longer need params. (optional)
  • status method insanely speed jump over 90%, Immediately setting Client Status on startup and throw proper errors.

6.5.5

19 Sep 02:48
Compare
Choose a tag to compare

Breaking Changes

  • @akarui/aoi.db Standalone Only: This has removed the custom database support until further notice, due to lack of functions supporting and complications of saving. This jumped fetching speed over 30%.
  • webhookUpdate is now webhooksUpdate (onWebhooksUpdate)

Bug Fixes

  • Fixed interactionCommand due to newer infrastructure not supporting prototype type.
  • Fixed $getLeaderBoardInfo to fetch properly
  • Fixed $guildCreatePost of content
  • Fixed $cacheMembers to newer methods of fetch

Improvements

  • Updated variables to database directory.

6.5.1

12 Sep 04:32
Compare
Choose a tag to compare

Fixed $inviteCode (important function)