Skip to content

Commit

Permalink
Merge pull request #410 from Rainb0wKey/patch-13
Browse files Browse the repository at this point in the history
New functions - 30-06-2024 (02-07-2024)
  • Loading branch information
kubastick authored Jul 13, 2024
2 parents 77a0858 + 3aaf59a commit 379231a
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

# 2024

## July
- Added `$setUserRoles[]`
- Added `$getLeaderboardPosition[]`
- Added `$isBooster[]`

<details><summary>Previous Updates</summary>

## June
- Added `$ai[]`
- Added `$aiQuota`

<details><summary>Previous Updates</summary>

## March
- Fixed the bot sometimes duplicating its answer
- Fixed `$onlyForIDs[]` not working correctly on big nodes
Expand Down
4 changes: 3 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
38 changes: 38 additions & 0 deletions src/bdscript/getLeaderboardPosition.md
Original file line number Diff line number Diff line change
@@ -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
```
35 changes: 35 additions & 0 deletions src/bdscript/isBooster.md
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 379231a

Please sign in to comment.