Skip to content

Commit

Permalink
Update OAPI.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Jul 28, 2024
1 parent a0c3273 commit 7a7cf0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,18 @@ const parseNation = (nation: RawNation) => {
const ParamErr = () => new SyntaxError(`Parameter 'name' is invalid. Must be of type string!`)
const FetchErr = (type: string, name: string) => new FetchError(`Could not fetch ${type} '${name}'. Invalid response received!`)

type DiscordReqObject = {
interface DiscordReqObject {
type: 'minecraft' | 'discord'
target: string
}

type DiscordResObject = {
interface DiscordResObject {
ID: string
UUID: string
}

export class OAPIV3 {
static serverInfo = async(): Promise<RawServerInfoV3> => await townyData('', 'v3')
static serverInfo = async (): Promise<RawServerInfoV3> => await townyData('', 'v3')

static discord = async (...objs: DiscordReqObject[]): Promise<DiscordResObject[]> =>
await townyData('/discord', 'v3', { query: objs })
Expand Down

0 comments on commit 7a7cf0e

Please sign in to comment.