mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
BREAKING: Rename getWebhooks to getGuildWebhooks (#2465)
* rename getWebhooks to getGuildWebhooks move getChannelWebhooks from `helpers/channels` to `helpers/webhooks` * helpers/webhooks: getWebhook -> getGuildWebhooks * tests: fix webhook test Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
co-authored by
Skillz4Killz
parent
1da3ffa6d2
commit
a0f130db50
@@ -11,6 +11,5 @@ export * from "./editChannelPermissionOverrides.ts";
|
||||
export * from "./getChannel.ts";
|
||||
export * from "./getChannelInvites.ts";
|
||||
export * from "./getChannels.ts";
|
||||
export * from "./getChannelWebhooks.ts";
|
||||
export * from "./triggerTypingIndicator.ts";
|
||||
export * from "./editChannelPositions.ts";
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Collection } from "../../util/collection.ts";
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
|
||||
*/
|
||||
export async function getWebhooks(bot: Bot, guildId: BigString): Promise<Collection<bigint, Webhook>> {
|
||||
export async function getGuildWebhooks(bot: Bot, guildId: BigString): Promise<Collection<bigint, Webhook>> {
|
||||
const results = await bot.rest.runMethod<DiscordWebhook[]>(
|
||||
bot.rest,
|
||||
"GET",
|
||||
@@ -7,7 +7,8 @@ export * from "./editWebhook.ts";
|
||||
export * from "./editWebhookMessage.ts";
|
||||
export * from "./editWebhookWithToken.ts";
|
||||
export * from "./executeWebhook.ts";
|
||||
export * from "./getChannelWebhooks.ts";
|
||||
export * from "./getGuildWebhooks.ts";
|
||||
export * from "./getWebhook.ts";
|
||||
export * from "./getWebhookMessage.ts";
|
||||
export * from "./getWebhooks.ts";
|
||||
export * from "./getWebhookWithToken.ts";
|
||||
|
||||
@@ -53,7 +53,7 @@ Deno.test("[webhooks] Webhook related tests", async (t) => {
|
||||
assertEquals(fetched.size > 1, true);
|
||||
|
||||
await t.step("[webhooks] Get guild webhooks", async () => {
|
||||
const guildWebhooks = await bot.helpers.getWebhooks(channel.guildId);
|
||||
const guildWebhooks = await bot.helpers.getGuildWebhooks(channel.guildId);
|
||||
assertEquals(guildWebhooks.size > 1, true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user