Merge pull request #5 from minseo0388/main

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

View file

@ -4,7 +4,7 @@ import {
DISCORD_API_URL, DISCORD_API_URL,
DISCORD_API_VERSION, DISCORD_API_VERSION,
DISCORD_CDN_URL DISCORD_CDN_URL
} from '../consts/urlsAndVersions.ts' } from '../consts/urlsAndVersions'
//Guild Endpoints //Guild Endpoints
const GUILDS = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds` const GUILDS = `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds`
@ -40,8 +40,24 @@ const CHANNEL_MESSAGE = (channelID: string, messageID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}`
const CHANNEL_CROSSPOST = (channelID: string, messageID: string) => const CHANNEL_CROSSPOST = (channelID: string, messageID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}/crosspost` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}/crosspost`
const MESSAGE_REACTION = (channelID: string, messageID: string, emoji: string) => const MESSAGE_REACTIONS = (channelID: string, messageID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}/reactions/${emoji}/@me` `${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}/reactions`
const MESSAGE_REACTION = (id: string, messageID: string, emoji: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${id}/messages/${messageID}/reactions/${emoji}`
const MESSAGE_REACTION_ME = (channelID: string, messageID: string, emojiID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}/reactions/${emojiID}/@me`
const MESSAGE_REACTION_USER = (channelID: string, messageID: string, emojiID: string, userID: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${channelID}/messages/${messageID}/reactions/${emojiID}/${userID}`
const CHANNEL_BULK_DELETE = (id: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${id}/messages/bulk-delete`
const CHANNEL_FOLLOW = (id: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${id}/followers`
const CHANNEL_INVITES = (id: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${id}/invites`
const CHANNEL_PINS = (id: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${id}/pins`
const CHANNEL_WEBHOOKS = (id: string) =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/channels/${id}/webhooks`
//User Endpoints //User Endpoints
const USER = (userID: string) => const USER = (userID: string) =>