Skip to content

Commit

Permalink
types: use Snowflake instead of string for snowflakes (#9583)
Browse files Browse the repository at this point in the history
fix: use `Snowflake` not `string`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Jiralite and kodiakhq[bot] authored May 19, 2023
1 parent 8107c5c commit 1c4a12c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/api/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class GuildsAPI {
* @param guildId - The id of the guild
* @param options - The options for fetching the guild
*/
public async get(guildId: string, { signal }: Pick<RequestData, 'signal'> = {}) {
public async get(guildId: Snowflake, { signal }: Pick<RequestData, 'signal'> = {}) {
return this.rest.get(Routes.guild(guildId), { signal }) as Promise<RESTGetAPIGuildResult>;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/api/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class WebhooksAPI {
id: Snowflake,
token: string,
messageId: Snowflake,
query: { thread_id?: string } = {},
query: { thread_id?: Snowflake } = {},
{ signal }: Pick<RequestData, 'signal'> = {},
) {
await this.rest.delete(Routes.webhookMessage(id, token, messageId), {
Expand Down

0 comments on commit 1c4a12c

Please sign in to comment.