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: >-
|
description: >-
|
||||||
Discord Deno TypeScript API library wrapper(Officially vetted library by
|
Discord Deno TypeScript API library wrapper(Officially vetted library by
|
||||||
Discord Team) https://discordeno.netlify.app
|
Discord Team) https://discordeno.netlify.app
|
||||||
version: 8.2.3
|
version: 8.3.0
|
||||||
stable: true
|
stable: true
|
||||||
files:
|
files:
|
||||||
- ./src/**/*
|
- ./src/**/*
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export * from "./src/handlers/channel.ts";
|
|||||||
export * from "./src/handlers/guild.ts";
|
export * from "./src/handlers/guild.ts";
|
||||||
export * from "./src/handlers/member.ts";
|
export * from "./src/handlers/member.ts";
|
||||||
export * from "./src/handlers/message.ts";
|
export * from "./src/handlers/message.ts";
|
||||||
|
export * from "./src/handlers/webhook.ts";
|
||||||
|
|
||||||
export * from "./src/types/activity.ts";
|
export * from "./src/types/activity.ts";
|
||||||
export * from "./src/types/cdn.ts";
|
export * from "./src/types/cdn.ts";
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export const endpoints = {
|
|||||||
|
|
||||||
WEBHOOK: (id: string, token: string) =>
|
WEBHOOK: (id: string, token: string) =>
|
||||||
`${baseEndpoints.BASE_URL}/webhooks/${id}/${token}`,
|
`${baseEndpoints.BASE_URL}/webhooks/${id}/${token}`,
|
||||||
|
WEBHOOK_ID: (id: string) => `${baseEndpoints.BASE_URL}/webhooks/${id}`,
|
||||||
|
|
||||||
// User endpoints
|
// User endpoints
|
||||||
USER_AVATAR: (id: string, icon: string) =>
|
USER_AVATAR: (id: string, icon: string) =>
|
||||||
|
|||||||
@@ -100,3 +100,7 @@ export async function executeWebhook(
|
|||||||
|
|
||||||
return createMessage(result as MessageCreateOptions);
|
return createMessage(result as MessageCreateOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getWebhook(webhookID: string) {
|
||||||
|
return RequestManager.get(endpoints.WEBHOOK_ID(webhookID))
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user