Files
discord.js/packages/core/src/api/voice.ts
Suneet Tipirneni 6d5840c61e fix(core): fix inconsistencies on core (#9680)
* fix(core): fix inconsistencies on `core`

* fix: add `createForumPost` back

* fix: create -> createWebhook
2023-07-06 13:35:10 +00:00

19 lines
644 B
TypeScript

/* eslint-disable jsdoc/check-param-names */
import type { RequestData, REST } from '@discordjs/rest';
import { Routes, type RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
export class VoiceAPI {
public constructor(private readonly rest: REST) {}
/**
* Fetches all voice regions
*
* @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions}
* @param options - The options for fetching the voice regions
*/
public async getVoiceRegions({ signal }: Pick<RequestData, 'signal'> = {}) {
return this.rest.get(Routes.voiceRegions(), { signal }) as Promise<RESTGetAPIVoiceRegionsResult>;
}
}