Skip to content

Commit

Permalink
feat: change the param type to Snowflake
Browse files Browse the repository at this point in the history
  • Loading branch information
Syjalo committed Jun 8, 2023
1 parent ee28cac commit 987aac9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rest/src/lib/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { URLSearchParams } from 'node:url';
import type { RESTPatchAPIChannelJSONBody } from 'discord-api-types/v10';
import type { RESTPatchAPIChannelJSONBody, Snowflake } from 'discord-api-types/v10';
import type { RateLimitData, ResponseLike } from '../REST.js';
import { type RequestManager, RequestMethod } from '../RequestManager.js';
import { RateLimitError } from '../errors/RateLimitError.js';
Expand Down Expand Up @@ -118,6 +118,6 @@ export async function onRateLimit(manager: RequestManager, rateLimitData: RateLi
*
* @param userId - The user id to calculate the default avatar index for
*/
export function calculateUserDefaultAvatarIndex(userId: string) {
export function calculateUserDefaultAvatarIndex(userId: Snowflake) {
return Number(BigInt(userId) >> 22n) % 6;
}

0 comments on commit 987aac9

Please sign in to comment.