mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-17 03:38:17 +00:00
refactor(util): update endpoints (#383)
* Update constants.ts * fiiiixxxx * dupe * Update src/util/constants.ts Co-authored-by: Ayyan <ayyantee@gmail.com> * USER_DM * fix this and remove that * Update src/util/constants.ts Co-authored-by: Ayyan <ayyantee@gmail.com> * Update constants.ts * Update src/util/constants.ts Co-authored-by: Ayyan <ayyantee@gmail.com> * Update src/util/constants.ts Co-authored-by: Ayyan <ayyantee@gmail.com> * need these * hmm * rename GUILD_EMBED to GUILD_WIDGET * idk * Update src/util/constants.ts Co-authored-by: Ayyan <ayyantee@gmail.com> * Update constants.ts * Update constants.ts Co-authored-by: Ayyan <ayyantee@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { botID } from "../../bot.ts";
|
||||
import { RequestManager } from "../../rest/request_manager.ts";
|
||||
import {
|
||||
CreateSlashCommandOptions,
|
||||
EditSlashCommandOptions,
|
||||
@@ -17,7 +18,6 @@ import { endpoints } from "../../util/constants.ts";
|
||||
import { botHasChannelPermissions } from "../../util/permissions.ts";
|
||||
import { urlToBase64 } from "../../util/utils.ts";
|
||||
import { structures } from "../structures/mod.ts";
|
||||
import { RequestManager } from "../../rest/request_manager.ts";
|
||||
|
||||
/** Create a new webhook. Requires the MANAGE_WEBHOOKS permission. Returns a webhook object on success. Webhook names follow our naming restrictions that can be found in our Usernames and Nicknames documentation, with the following additional stipulations:
|
||||
*
|
||||
@@ -166,7 +166,7 @@ export function editWebhookMessage(
|
||||
}
|
||||
|
||||
return RequestManager.patch(
|
||||
endpoints.WEBHOOK_EDIT(webhookID, webhookToken, messageID),
|
||||
endpoints.WEBHOOK_MESSAGE(webhookID, webhookToken, messageID),
|
||||
{ ...options, allowed_mentions: options.allowed_mentions },
|
||||
);
|
||||
}
|
||||
@@ -177,7 +177,7 @@ export function deleteWebhookMessage(
|
||||
messageID: string,
|
||||
) {
|
||||
return RequestManager.delete(
|
||||
endpoints.WEBHOOK_DELETE(webhookID, webhookToken, messageID),
|
||||
endpoints.WEBHOOK_MESSAGE(webhookID, webhookToken, messageID),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user