This commit is contained in:
Skillz4Killz
2022-03-25 19:31:16 +00:00
committed by GitHub
parent eb6afaef5f
commit d2d0dd37ae
2 changed files with 8 additions and 4 deletions

View File

@@ -4,7 +4,11 @@ import { Collection } from "../../util/collection.ts";
/** Returns an array of voice regions that can be used when creating servers. */
export async function getAvailableVoiceRegions(bot: Bot) {
const result = await bot.rest.runMethod<DiscordVoiceRegion[]>(bot.rest, "get", bot.constants.endpoints.VOICE_REGIONS());
const result = await bot.rest.runMethod<DiscordVoiceRegion[]>(
bot.rest,
"get",
bot.constants.endpoints.VOICE_REGIONS(),
);
return new Collection(
result.map((region) => {

View File

@@ -15,14 +15,14 @@ import { API_VERSION } from "../util/constants.ts";
export function createRestManager(options: CreateRestManagerOptions) {
const version = options.version || API_VERSION;
console.log('url1', baseEndpoints.BASE_URL)
console.log("url1", baseEndpoints.BASE_URL);
if (options.customUrl) {
console.log('url2', baseEndpoints.BASE_URL)
console.log("url2", baseEndpoints.BASE_URL);
baseEndpoints.BASE_URL = `${options.customUrl}/v${version}`;
}
console.log('url3', baseEndpoints.BASE_URL)
console.log("url3", baseEndpoints.BASE_URL);
return {
// current invalid amount