diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 5e7a74a6e9..954947e307 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -2,12 +2,17 @@ # 2024 +## July +- Added `$setUserRoles[]` +- Added `$getLeaderboardPosition[]` +- Added `$isBooster[]` + +
Previous Updates + ## June - Added `$ai[]` - Added `$aiQuota` -
Previous Updates - ## March - Fixed the bot sometimes duplicating its answer - Fixed `$onlyForIDs[]` not working correctly on big nodes diff --git a/src/SUMMARY.md b/src/SUMMARY.md index f4281465ca..19a1081ad9 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -44,7 +44,7 @@ - [Resources]() - [Introduction](./resources/introduction.md) - - [API](./resources/api.md) + - [BDFD API](./resources/api.md) - [BDFD's Creation](./resources/bdfdCreation.md) - [Discord's ID System](./resources/discordIDSystem.md) - [Discord Timestamps](./resources/discordTimestamps.md) @@ -194,6 +194,7 @@ - [$getCustomStatus](./bdscript/getCustomStatus.md) - [$getEmbedData](./bdscript/getEmbedData.md) - [$getInviteInfo](./bdscript/getInviteInfo.md) + - [$getLeaderboardPosition](./bdscript/getLeaderboardPosition.md) - [$getLeaderboardValue](./bdscript/getLeaderboardValue.md) - [$getMessage](./bdscript/getMessage.md) - [$getReactions](./bdscript/getReactions.md) @@ -230,6 +231,7 @@ - [$isAdmin](./bdscript/isAdmin.md) - [$isBanned](./bdscript/isBanned.md) - [$isBoolean](./bdscript/isBoolean.md) + - [$isBooster](./bdscript/isBooster.md) - [$isBot](./bdscript/isBot.md) - [$isHoisted](./bdscript/isHoisted.md) - [$isMentionable](./bdscript/isMentionable.md) diff --git a/src/bdscript/getLeaderboardPosition.md b/src/bdscript/getLeaderboardPosition.md new file mode 100644 index 0000000000..fa1a8bea18 --- /dev/null +++ b/src/bdscript/getLeaderboardPosition.md @@ -0,0 +1,38 @@ +# $getLeaderboardPosition +Get position in leaderboard for given variable. + +## Syntax +``` +$getLeaderboardPosition[Variable type;Variable name;Sort type;(User ID)] +``` + +### Parameters +- `Variable type` `(Type: Enum || Flag: Required)`: The type of the variable. Variable types: + - `user` - [User variable](../guides/introduction/variables.md#user-variables) + - `globalUser` - [Global-User variable](../guides/introduction/variables.md#globalglobal-user-variables) +- `Variable name` `(Type: String || Flag: Required)`: The variable name to generate the leaderboard for. +- `Sort type` `(Type: Enum || Flag: Required)`: The sort type. Sort types: + - `asc` - Sorts the values in ascending order. + - `desc` - Sorts the values in descending order. +- `User ID`: `(Type: Snowflake || Flag: Optional)`: ID of the user from whom you want to get a position in the leaderboard. + +## Example +``` +$nomention +My position in leaderboards: $getLeaderboardPosition[user;Coins;desc] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + My position in leaderboards: 2 +``` diff --git a/src/bdscript/isBooster.md b/src/bdscript/isBooster.md new file mode 100644 index 0000000000..03d70a91e8 --- /dev/null +++ b/src/bdscript/isBooster.md @@ -0,0 +1,35 @@ +# $isBooster +Returns if user is boosting guild with nitro. + +> "true" means the user is a booster, "false" means it isn't. + +## Syntax +``` +$isBooster[(User ID;Guild ID)] +``` + +### Parameters + +## Example +``` +$nomention +Booster? $isBooster[$mentioned[1]] +``` + +``` discord yaml +- user_id: 803569638084313098 + username: RainbowKey + color: "#E67E22" + content: | + !example <@kubastick> +- user_id: 1009018156494368798 + username: BDFD Support + color: "#378afa" + bot: true + verified: true + content: | + Booster? true +``` + +> You can use `$isBooster[]` to get the status of author.\ +> [How `$mentioned[]` works?](./mentioned.md)