diff --git a/constants/discord.ts b/constants/discord.ts index 4c85c64f8..11681f9a2 100644 --- a/constants/discord.ts +++ b/constants/discord.ts @@ -1,9 +1,15 @@ +let VERSION = 'v7' + export const baseEndpoints = { /** Although, the version can be defaulted, keep the v6 as it can be changed to test newer versions when necessary. */ - BASE_URL: "https://discord.com/api/v7", + BASE_URL: `https://discord.com/api/${VERSION}`, CDN_URL: "https://cdn.discordapp.com", }; +export function changeAPIVersion(number = 7) { + VERSION = `v${number}` +} + const GUILDS_BASE = (id: string) => `${baseEndpoints.BASE_URL}/guilds/${id}`; export const endpoints = {