mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-17 03:38:17 +00:00
fix: outdated pin & unpin handlers and endpoints
This commit is contained in:
@@ -68,7 +68,8 @@ export async function pin(channelID: string, messageID: string) {
|
||||
) {
|
||||
throw new Error(Errors.MISSING_MANAGE_MESSAGES);
|
||||
}
|
||||
return RequestManager.put(endpoints.CHANNEL_MESSAGE(channelID, messageID));
|
||||
|
||||
return RequestManager.put(endpoints.CHANNEL_PIN(channelID, messageID));
|
||||
}
|
||||
|
||||
/** Unpin a message in a channel. Requires MANAGE_MESSAGES. */
|
||||
@@ -82,8 +83,9 @@ export async function unpin(channelID: string, messageID: string) {
|
||||
) {
|
||||
throw new Error(Errors.MISSING_MANAGE_MESSAGES);
|
||||
}
|
||||
|
||||
return RequestManager.delete(
|
||||
endpoints.CHANNEL_MESSAGE(channelID, messageID),
|
||||
endpoints.CHANNEL_PIN(channelID, messageID),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user