mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
add getWebhook and export the webhook in mod
This commit is contained in:
@@ -2,7 +2,7 @@ name: Discordeno
|
||||
description: >-
|
||||
Discord Deno TypeScript API library wrapper(Officially vetted library by
|
||||
Discord Team) https://discordeno.netlify.app
|
||||
version: 8.2.3
|
||||
version: 8.3.0
|
||||
stable: true
|
||||
files:
|
||||
- ./src/**/*
|
||||
|
||||
@@ -14,6 +14,7 @@ export * from "./src/handlers/channel.ts";
|
||||
export * from "./src/handlers/guild.ts";
|
||||
export * from "./src/handlers/member.ts";
|
||||
export * from "./src/handlers/message.ts";
|
||||
export * from "./src/handlers/webhook.ts";
|
||||
|
||||
export * from "./src/types/activity.ts";
|
||||
export * from "./src/types/cdn.ts";
|
||||
|
||||
@@ -87,6 +87,7 @@ export const endpoints = {
|
||||
|
||||
WEBHOOK: (id: string, token: string) =>
|
||||
`${baseEndpoints.BASE_URL}/webhooks/${id}/${token}`,
|
||||
WEBHOOK_ID: (id: string) => `${baseEndpoints.BASE_URL}/webhooks/${id}`,
|
||||
|
||||
// User endpoints
|
||||
USER_AVATAR: (id: string, icon: string) =>
|
||||
|
||||
@@ -100,3 +100,7 @@ export async function executeWebhook(
|
||||
|
||||
return createMessage(result as MessageCreateOptions);
|
||||
}
|
||||
|
||||
export function getWebhook(webhookID: string) {
|
||||
return RequestManager.get(endpoints.WEBHOOK_ID(webhookID))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user