mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 18:00:08 +00:00
Use as instead of specifying the generic (#4111)
This commit is contained in:
@@ -194,9 +194,9 @@ const desiredProperties = createDesiredPropertiesObject({
|
||||
|
||||
interface BotDesiredProperties extends Required<typeof desiredProperties> {}
|
||||
|
||||
const bot = createBot<BotDesiredProperties>({
|
||||
const bot = createBot({
|
||||
// Your usual createBot options, such as token and intents
|
||||
desiredProperties,
|
||||
desiredProperties: desiredProperties as BotDesiredProperties,
|
||||
});
|
||||
```
|
||||
|
||||
@@ -206,4 +206,4 @@ Now, when you hover over `bot.helpers.getUser()`, you'll see:
|
||||
(property) getUser: (id: BigString) => Promise<SetupDesiredProps<User, BotDesiredProperties, DesiredPropertiesBehavior.RemoveKey>>
|
||||
```
|
||||
|
||||
This makes it more readable and easier to work with.
|
||||
This makes it more readable and easier to work with.
|
||||
|
||||
Reference in New Issue
Block a user