Releases: aoijs/aoi.js
6.8.0
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]
- New usage:
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-overconsole.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 usesSnowflakeUtil
- b617d99 Fixed
{edit}
parser - 46ddfdf Fixed error parsing in cooldown functions
- 216e3fb Fixed
$awaitMessageReactions
- 9012c96 Fixed
$clear
having a maximum of99
instead of100
Minor Changes
- a6721d8
$updateCommands
now supports sharding
6.7.1
6.7.0
Features:
- [435f88c] Added $deleteButton.
- [51022b4] Added $root.
- [51022b4] Added $celi.
- [51022b4] Added $pow.
- [2f4c008] Added $floor.
- [136e180] Added $isValidColor.
- [06754de] Added $and.
- [b2cf904] Added $or.
- [b961a76] Added $index.
- [760434a] Added $referenceUserID.
- [03b9314] Added support for all select menu types.
- [d33ef47] Added suppressAllErrors / errorMessage now supports functions and parser.
- [d5524ed] Added {reply} & {ephemeral} of parser.
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
6.6.0
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
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
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 nowwebhooksUpdate
(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
todatabase
directory.
6.5.1
6.5.0
5040cc3 wrong invite functions deletion
2c27fd7 Update getAutomodRuleId.js
722d750 Update getAutomodRuleId.js
7093bad Update createAutomodRule.js
0156de7 improvements
c262b9b minor improvements
f3c1c20 Added $userGlobalName
911ddf3 Added $memberDisplayColor
32d310a Added $memberDisplayName
25bd0b3 $userDisplayName is properly user only.
c761e90 made LoadCommands instance
1d3d07e fixed if $ is used it will log error
241f43e Update math.js
38c9d83 Update math.js
ec77eee Update math.js
778e176 $displayName to $userDisplayName
88a559c refactor: createAutomodRule
747b824 fix: guildCreatePost
72701ed feat: getAutomodRuleId --> returns automod rule id
32bc09f fix: redo createAutomodRule
9cb1732 updated engine
b6543a0 updated to current
8481abf fix: suppressAllErrors
parsing
4d66a93 $fetch now support sub-properties
b15e77c removed invite class for package.
caed235 fix: partial httpRequest fix
7fae3d3 feat: automod functions
9798884 feat: suppressAllErrors
parser support
bb46be7 update readme
21ae314 cleanup
34feb96 update type
99dae3e Updated all logs to use new logging
c29f469 Client status changes
347f155 fix: return all possible properties
05f5d4c Rename createPost to guildCreatePost
8d2fde1 bump dep
6939316 feat: forum functions
a6a7e47 Changed dynamic, format is now extension in authorBanner
a93cf12 guildBanner now supports size, dynamic, and extension
89905e9 guildSplash now supports size, dynamic, and extension
3614099 Changed dynamic, format is now extension in userBanner
98dcd52 guildIcon now supports size, dynamic, and extension
ce83519 added custom event types
c424349 fixed shardID method
bc03953 remove outdated dep
ec6d1b9 add prototypes types
cd1bed9 add util types
8814d1f bump
66f54ba Update LoadCommands.js
c3c18d3 updated loadcommands
5cff19b Update index.js
acd69ce added db class to index
a827a6d $createVar -> $createTemporaryVar
10c0dda removal of outdated db functions support
3ec2603 no longer accepting other db
23ecb67 bump dep
22f5ff9 Changed displayAvatatURL to avatarURL
e4a9966 Update interpreter.js
d604b2b Update interpreter.js
fc1f726 undo changes in this file
ef5d3c9 Improvement of Util
e8d8bd0 fixed $getLeaderboardInfo
(?)
8158e6b fixed $getLeaderboardInfo
3e3955c fixed $addTimestamp
d6f6c65 fixed $channelCategoryID
6c645ce update some paths
683547a updated setObjectProperty
a11bf8f object functions
4b616a1 Updated AoiError to a cleaner erroring
65f64ca Fixed $isUnicodeEmoji to regex
e8c2393 minor improvements of core.
bf5a364 AoiClient has been improved drastically.
1eec797 Changed "avatarURL()" to "displayAvatarURL()"
560cb5e updated object functions
c06a5e8 parser support for errorMessage
66b37f3 ownerID -> guildOwnerID
06af41e $if: old now only send warning once if used.
6af6941 faster loadCommands
6.4.0
Changes
onApplicationCmdPermsUpdate
is nowonApplicationCommandPermissionsUpdate
(applicationCmdPermissionsUpdate)AoiAutoUpdate
has been renamed toaoiAutoUpdate
in ** AoiClient** options.- Removed
plugins
in AoiClient
Bug Fixes
- Fixed $deleteThread.
- Fixed $leaveThread.
- Fixed
applicationCmdUpdate
event/command.
Improvements
- Updated $getClientInvite method.
- Updated $addThreadMember method.
- Updated $eval. (name property)
- Function error no longer returns full code.
Added
- Added $isWidgetEnabled.
- Added $guildWidgetChannelID.
- Added $getGuildAutomodNames.
- Added $guildCommunityUpdatesChannelID.
- Added $guildMaxStageVideoChannelUsers.
- Added $guildMaxVideoChannelUsers.
- Added $guildSafetyChannelID.
- Added $clientPrefixes.
- Added $unlockThread.
- Added $lockThread.
- Added
groupDM
channel type. - Added
disableFunctions
in AoiClient options. (Not supposed been removed since v5)
Automod Events
+ onAutoModerationActionExecution
+ onAutoModerationRuleDelete
+ onAutoModerationRuleCreate
+ onAutoModerationRuleUpdate
Automod Command Types
+ autoModActionExecution
+ autoModCreate
+ autoModDelete
+ autoModUpdate
Invite System (AoiInviteSystem class)
Added the following functions:
- $invite
- $inviteChannelID
- $inviteCode
- $inviteGuildID
- $inviteMaxUses
- $inviteURL
- $inviteUserID
- $userInfo
These functions are meant to be used within invite/delete event, as well onJoin/onLeave event.
Intents are needed for invite system.