Skip to content

Commit

Permalink
Merge pull request #417 from Kitosight/patch-2
Browse files Browse the repository at this point in the history
fix($getLeaderboardPosition): grammar
  • Loading branch information
kubastick committed Jul 16, 2024
2 parents feff242 + fcfdd04 commit 9261db5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/bdscript/getLeaderboardPosition.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# $getLeaderboardPosition
Get position in leaderboard for given variable.
Get position in a leaderboard for a 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:
- `Variable type` `(Type: Enum || Flag: Required)`: The variable type. 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.
- `Variable name` `(Type: String || Flag: Required)`: The variable name to generate a 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.
- `asc` - Sorts values in ascending order.
- `desc` - Sorts values in descending order.
- `User ID`: `(Type: Snowflake || Flag: Optional)`: The ID of a user from whom you want to get a position in a leaderboard.

## Example
```
$nomention
My position in leaderboards: $getLeaderboardPosition[user;Coins;desc]
Your position in the leaderboard: $getLeaderboardPosition[user;Coins;desc]
```

``` discord yaml
Expand All @@ -34,5 +34,5 @@ My position in leaderboards: $getLeaderboardPosition[user;Coins;desc]
bot: true
verified: true
content: |
My position in leaderboards: 2
Your position in the leaderboard: 2
```

0 comments on commit 9261db5

Please sign in to comment.