mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
fix typo in README example
This commit is contained in:
@@ -112,9 +112,9 @@ You can also generate a hydration function that returns a type narrowing boolean
|
|||||||
```typescript
|
```typescript
|
||||||
client.chatCommands.register('me', async (context: Context, _args: any[]) => {
|
client.chatCommands.register('me', async (context: Context, _args: any[]) => {
|
||||||
// Hydrate the message id from the context
|
// Hydrate the message id from the context
|
||||||
const hydrate = await context.hydrator(hydrated, [Expectation.Guild]);
|
const hydrate = await context.hydrator(context, [Expectation.Guild]);
|
||||||
// Check if the object is hydrated
|
// Check if the object is hydrated
|
||||||
const hasGuild = hydrate(hydrated);
|
const hasGuild = hydrate(context);
|
||||||
|
|
||||||
if (hasGuild) {
|
if (hasGuild) {
|
||||||
// Send a message stating the user that they are in a guild
|
// Send a message stating the user that they are in a guild
|
||||||
@@ -223,4 +223,4 @@ const quotesCommandHandler = createCommandHandler({
|
|||||||
|
|
||||||
client.chatCommands.register('quotes', quotesCommandHandler);
|
client.chatCommands.register('quotes', quotesCommandHandler);
|
||||||
client.applicationCommands.register('quotes', ApplicationCommandType.Chat, quotesCommandHandler);
|
client.applicationCommands.register('quotes', ApplicationCommandType.Chat, quotesCommandHandler);
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user