diff --git a/constants/discord.ts b/constants/discord.ts index 62f4c97fb..edff35de6 100644 --- a/constants/discord.ts +++ b/constants/discord.ts @@ -12,7 +12,7 @@ export const endpoints = { // Channel Endpoints CHANNEL_MESSAGE: (id: string, message_id: string) => `${baseEndpoints.BASE_URL}/channels/${id}/messages/${message_id}`, - CHANNEL_MESSAGES: (id: string) => `${baseEndpoints.BASE_URL}/channels/${id}`, + CHANNEL_MESSAGES: (id: string) => `${baseEndpoints.BASE_URL}/channels/${id}/messages`, CHANNEL_PINS: (id: string) => `${baseEndpoints.BASE_URL}/channels/${id}/pins`, CHANNEL_BULK_DELETE: (id: string) => `${baseEndpoints.BASE_URL}/channels/${id}/messages/bulk-delete`, CHANNEL_INVITES: (id: string) => `${baseEndpoints.BASE_URL}/channels/${id}/invites`, diff --git a/structures/message.ts b/structures/message.ts index 36b13eb9c..f0e1dc048 100644 --- a/structures/message.ts +++ b/structures/message.ts @@ -107,7 +107,7 @@ export const create_message = (data: Message_Create_Options, client: Client) => if (content.content && content.content.length > 2000) throw new Error(Errors.MESSAGE_MAX_LENGTH) - const result = await Request_Manager.patch(endpoints.CHANNEL_MESSAGES(data.id), content) + const result = await Request_Manager.patch(endpoints.CHANNEL_MESSAGE(data.channel_id, data.id), content) return create_message(result, client) } })