Skip to content

Commit

Permalink
Fix types for getThumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
Reselim committed Dec 29, 2024
1 parent 5afecc2 commit 88cc36d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Client, TextChannel, ButtonStyle, Message, InteractionResponseType, Com
import pino from "pino"
import { resolve } from "path"
import config from "./config.json"
import { getIdFromUsername, getPlayerInfo, getPlayerThumbnail, PlayerInfo, PlayerThumbnailData } from "noblox.js"
import { BodySizes, BustSizes, getIdFromUsername, getPlayerInfo, getPlayerThumbnail, HeadshotSizes, PlayerInfo, PlayerThumbnailData } from "noblox.js"
import { AccountPlatform, ActionType, API, createAction } from "@free-draw/moderation-client"
import axios from "axios"

Expand Down Expand Up @@ -59,7 +59,7 @@ async function downloadAttachment(attachment: Attachment): Promise<AttachmentPay
}
}

async function getThumbnail(id: number, size: number, type: "body" | "bust" | "headshot"): Promise<string | null> {
async function getThumbnail(id: number, size: BodySizes | BustSizes | HeadshotSizes, type: "body" | "bust" | "headshot"): Promise<string | null> {
const response = await getPlayerThumbnail([ id ], size, "png", false, type)

if (response.length > 0) {
Expand Down

0 comments on commit 88cc36d

Please sign in to comment.