Classes
Methods
# static fromDatabase(data, ctx) → {Category}
Parameters:
| Name | Type | Description |
|---|---|---|
data |
DBCategory
|
|
ctx |
RequestContext
|
# async static getCategories(ctx, max, page, clientnullable) → {Promise.<Collection.<SnowflakeString, Category>>}
Gets categories
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
ctx |
RequestContext
|
||
max |
number
|
||
page |
number
|
||
client |
UserClient
|
<nullable> |
Promise.<Collection.<SnowflakeString, Category>>
# async static getCategory(id, ctx, client) → {Promise.<Category>}
Fetches category by id
Parameters:
| Name | Type | Description |
|---|---|---|
id |
bigint
|
Snowflake
|
SnowflakeString
|
|
ctx |
requestContext
|
|
client |
UserClient
|
undefined
|
Promise.<Category>
# async static getCategoryCount(ctx) → {Promise.<number>}
Gets total number of categories
Parameters:
| Name | Type | Description |
|---|---|---|
ctx |
RequestContext
|
Promise.<number>