Merge pull request #8 from minseo0388/main

Update endpoint.ts
This commit is contained in:
Choi Minseo 2020-10-22 12:37:37 +09:00 committed by GitHub
commit 9b34b59b38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
//Being Written by Choi Donghan, Catry //Written by Choi Donghan, Catry
import { import {
DISCORD_API_URL, DISCORD_API_URL,
@ -77,16 +77,34 @@ const CHANNEL_PINS = (channelID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/pins` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/pins`
//User Endpoints //User Endpoints
const CURRENT_USER = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/@me`
const CURRENT_USER_GUILDS = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/@me/guilds`
const USER_DM = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/@me/channels`
const USER_CONNECTIONS = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/@me/connections`
const LEAVE_GUILD = (guildID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/@me/guilds/${guildID}`
const USER = (userID: string) => const USER = (userID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/${userID}` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/${userID}`
const USER_CREATE_DM = () =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/users/@me/channels`
//Webhook Endpoints //Webhook Endpoints
const WEBHOOKS = (channelID: string) => const CHANNEL_WEBHOOKS = (channelID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/webhooks` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/webhooks`
const GUILD_WEBHOOK = (guildID :string) => const GUILD_WEBHOOK = (guildID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/webhooks` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/webhooks`
const WEBHOOK = (webhookID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/webhooks/${webhookID}`
const WEBHOOK_WITH_TOKEN = (webhookID: string, webhookTOKEN: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/webhooks/${webhookID}/${webhookTOKEN}`
const SLACK_WEBHOOK = (webhookID: string, webhookTOKEN: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/webhooks/${webhookID}/${webhookTOKEN}/slack`
const GITHUB_WEBHOOK = (webhookID: string, webhookTOKEN: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/webhooks/${webhookID}/${webhookTOKEN}/github`
//Gateway Endpoints
const GATEWAY = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/gateway`
const GATEWAY_BOT = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/gateway/bot`
//CDN Endpoints //CDN Endpoints
const CUSTOM_EMOJI = (emojiID: string) => const CUSTOM_EMOJI = (emojiID: string) =>