From 466fa95b0e239b7984275959886b995a5020640a Mon Sep 17 00:00:00 2001 From: didinele Date: Sat, 13 Feb 2021 01:05:13 +0200 Subject: [PATCH] feat(rest): api base routes (#87) Co-authored-by: Vlad Frangu --- .vscode/settings.json | 5 +++-- v8/rest/index.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 37441beed..76b600546 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "files.eol": "\n" -} \ No newline at end of file + "files.eol": "\n", + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/v8/rest/index.ts b/v8/rest/index.ts index d7b0dc0fc..311a495b8 100644 --- a/v8/rest/index.ts +++ b/v8/rest/index.ts @@ -628,6 +628,20 @@ export const Routes = { }, }; +export const RouteBases = { + api: 'https://discord.com/api', + cdn: 'https://cdn.discordapp.com', + invite: 'https://discord.gg', + template: 'https://discord.new', + gift: 'https://discord.gift', +} as const; + +/** + * Freeze bases object + * @internal + */ +Object.freeze(RouteBases); + export const OAuth2Routes = { authorizationURL: `https://discord.com/api/v${APIVersion}/oauth2/authorize`, tokenURL: `https://discord.com/api/v${APIVersion}/oauth2/token`,