mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-18 01:07:22 +00:00
allow changing api version on the fly
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user