add getWebhook and export the webhook in mod

This commit is contained in:
Skillz
2020-08-28 17:02:13 -04:00
parent 44fafa13bd
commit 4f3e2214df
4 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -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/**/*
+1
View File
@@ -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";
+1
View File
@@ -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) =>
+4
View File
@@ -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))
}