- Preparing search index...
- The search index is not available
amaribot.js
Methods
Private
_request
- _request(endpoint: string, query?: {
[key: string]: string | number;
}, method?: string, body?: {
[key: string]: any;
}): Promise<unknown>
Private
Parameters
-
endpoint: string
-
query: {
[key: string]: string | number;
} = {}
-
[key: string]: string | number
-
method: string = "GET"
-
body: {
[key: string]: any;
} = {}
Returns Promise<unknown>
getBulkUserLevel
- getBulkUserLevel(guildId: string, userId: string[]): Promise<APIBulkUsers>
-
Parameters
-
guildId: string
-
userId: string[]
getCombinedLeaderboard
- getCombinedLeaderboard(guildId: string): Promise<{
count: number;
data: APIUser[];
}>
-
Returns Promise<{
count: number;
data: APIUser[];
}>
getLeaderboardPosition
- getLeaderboardPosition(guildId: string, userId: string): Promise<number>
-
Parameters
-
guildId: string
-
userId: string
Returns Promise<number>
getNextLevelExp
- getNextLevelExp(level: number): number
-
Returns number
getUserLevel
- getUserLevel(guildId: string, userId: string | string[]): Promise<APIUser>
-
Parameters
-
guildId: string
-
userId: string | string[]
Returns Promise<APIUser>
getWeeklyLeaderboardPosition
- getWeeklyLeaderboardPosition(guildId: string, userId: string): Promise<number>
-
Parameters
-
guildId: string
-
userId: string
Returns Promise<number>
Description
This is the main class that you initalize to perform all the requests to the API