mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
types: use Snowflake instead of string for snowflakes (#9583)
fix: use `Snowflake` not `string` Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -102,7 +102,7 @@ export class GuildsAPI {
|
|||||||
* @param guildId - The id of the guild
|
* @param guildId - The id of the guild
|
||||||
* @param options - The options for fetching 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>;
|
return this.rest.get(Routes.guild(guildId), { signal }) as Promise<RESTGetAPIGuildResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export class WebhooksAPI {
|
|||||||
id: Snowflake,
|
id: Snowflake,
|
||||||
token: string,
|
token: string,
|
||||||
messageId: Snowflake,
|
messageId: Snowflake,
|
||||||
query: { thread_id?: string } = {},
|
query: { thread_id?: Snowflake } = {},
|
||||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||||
) {
|
) {
|
||||||
await this.rest.delete(Routes.webhookMessage(id, token, messageId), {
|
await this.rest.delete(Routes.webhookMessage(id, token, messageId), {
|
||||||
|
|||||||
Reference in New Issue
Block a user