From db63b7901a5ac408417c99fb9720f9b7f4a4dec0 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Sun, 5 Dec 2021 16:50:03 +0000 Subject: [PATCH] undefined > void --- src/helpers/channels/deleteChannelOverwrite.ts | 2 +- src/helpers/channels/deleteStageInstance.ts | 2 +- src/helpers/channels/editChannelOverwrite.ts | 2 +- src/helpers/channels/startTyping.ts | 2 +- src/helpers/channels/swapChannels.ts | 2 +- src/helpers/channels/threads/addToThread.ts | 2 +- src/helpers/channels/threads/joinThread.ts | 2 +- src/helpers/channels/threads/leaveThread.ts | 2 +- src/helpers/channels/threads/removeThreadMember.ts | 2 +- src/helpers/discovery/removeDiscoverySubcategory.ts | 2 +- src/helpers/emojis/deleteEmoji.ts | 2 +- src/helpers/guilds/deleteGuild.ts | 2 +- src/helpers/guilds/leaveGuild.ts | 2 +- src/helpers/integrations/deleteIntegration.ts | 6 +----- .../interactions/commands/deleteApplicationCommand.ts | 2 +- .../interactions/commands/deleteInteractionResponse.ts | 2 +- src/helpers/members/banMember.ts | 2 +- src/helpers/members/kickMember.ts | 9 +++------ src/helpers/members/unbanMember.ts | 2 +- src/helpers/messages/addReaction.ts | 2 +- src/helpers/messages/deleteMessage.ts | 2 +- src/helpers/messages/deleteMessages.ts | 2 +- src/helpers/messages/pinMessage.ts | 6 +----- src/helpers/messages/removeAllReactions.ts | 2 +- src/helpers/messages/removeReaction.ts | 2 +- src/helpers/messages/removeReactionEmoji.ts | 2 +- src/helpers/messages/unpinMessage.ts | 6 +----- src/helpers/roles/addRole.ts | 2 +- src/helpers/roles/deleteRole.ts | 2 +- src/helpers/roles/removeRole.ts | 2 +- src/helpers/webhooks/deleteWebhook.ts | 2 +- src/helpers/webhooks/deleteWebhookMessage.ts | 2 +- src/helpers/webhooks/deleteWebhookWithToken.ts | 6 +----- 33 files changed, 35 insertions(+), 54 deletions(-) diff --git a/src/helpers/channels/deleteChannelOverwrite.ts b/src/helpers/channels/deleteChannelOverwrite.ts index e3adb4ffa..6b855f73e 100644 --- a/src/helpers/channels/deleteChannelOverwrite.ts +++ b/src/helpers/channels/deleteChannelOverwrite.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../bot.ts"; /** Delete the channel permission overwrites for a user or role in this channel. Requires `MANAGE_ROLES` permission. */ export async function deleteChannelOverwrite(bot: Bot, channelId: bigint, overwriteId: bigint): Promise { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.CHANNEL_OVERWRITE(channelId, overwriteId) diff --git a/src/helpers/channels/deleteStageInstance.ts b/src/helpers/channels/deleteStageInstance.ts index b2594e572..f359f2088 100644 --- a/src/helpers/channels/deleteStageInstance.ts +++ b/src/helpers/channels/deleteStageInstance.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Deletes the Stage instance. Requires the user to be a moderator of the Stage channel. */ export async function deleteStageInstance(bot: Bot, channelId: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.STAGE_INSTANCE(channelId)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.STAGE_INSTANCE(channelId)); } diff --git a/src/helpers/channels/editChannelOverwrite.ts b/src/helpers/channels/editChannelOverwrite.ts index 3fac722c7..eec214cff 100644 --- a/src/helpers/channels/editChannelOverwrite.ts +++ b/src/helpers/channels/editChannelOverwrite.ts @@ -8,7 +8,7 @@ export async function editChannelOverwrite( overwriteId: bigint, options: Omit ): Promise { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "put", bot.constants.endpoints.CHANNEL_OVERWRITE(channelId, overwriteId), diff --git a/src/helpers/channels/startTyping.ts b/src/helpers/channels/startTyping.ts index b33a21563..688c7b0eb 100644 --- a/src/helpers/channels/startTyping.ts +++ b/src/helpers/channels/startTyping.ts @@ -7,5 +7,5 @@ import type { Bot } from "../../bot.ts"; * this endpoint may be called to let the user know that the bot is processing their message. */ export async function startTyping(bot: Bot, channelId: bigint) { - return await bot.rest.runMethod(bot.rest, "post", bot.constants.endpoints.CHANNEL_TYPING(channelId)); + await bot.rest.runMethod(bot.rest, "post", bot.constants.endpoints.CHANNEL_TYPING(channelId)); } diff --git a/src/helpers/channels/swapChannels.ts b/src/helpers/channels/swapChannels.ts index 5cb8e5cd0..aec44f2ea 100644 --- a/src/helpers/channels/swapChannels.ts +++ b/src/helpers/channels/swapChannels.ts @@ -7,7 +7,7 @@ export async function swapChannels(bot: Bot, guildId: bigint, channelPositions: throw "You must provide at least one channels to be moved."; } - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "patch", bot.constants.endpoints.GUILD_CHANNELS(guildId), diff --git a/src/helpers/channels/threads/addToThread.ts b/src/helpers/channels/threads/addToThread.ts index 05bc89af4..a146e48bc 100644 --- a/src/helpers/channels/threads/addToThread.ts +++ b/src/helpers/channels/threads/addToThread.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../../bot.ts"; /** Adds a user to a thread. Requires the ability to send messages in the thread. Requires the thread is not archived. */ export async function addToThread(bot: Bot, threadId: bigint, userId: bigint) { - return await bot.rest.runMethod(bot.rest, "put", bot.constants.endpoints.THREAD_USER(threadId, userId)); + await bot.rest.runMethod(bot.rest, "put", bot.constants.endpoints.THREAD_USER(threadId, userId)); } diff --git a/src/helpers/channels/threads/joinThread.ts b/src/helpers/channels/threads/joinThread.ts index 0a8ec5967..17429e042 100644 --- a/src/helpers/channels/threads/joinThread.ts +++ b/src/helpers/channels/threads/joinThread.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../../bot.ts"; /** Adds the bot to the thread. Cannot join an archived thread. */ export async function joinThread(bot: Bot, threadId: bigint) { - return await bot.rest.runMethod(bot.rest, "put", bot.constants.endpoints.THREAD_ME(threadId)); + await bot.rest.runMethod(bot.rest, "put", bot.constants.endpoints.THREAD_ME(threadId)); } diff --git a/src/helpers/channels/threads/leaveThread.ts b/src/helpers/channels/threads/leaveThread.ts index 6792dd31b..1fe3a611a 100644 --- a/src/helpers/channels/threads/leaveThread.ts +++ b/src/helpers/channels/threads/leaveThread.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../../bot.ts"; /** Removes the bot from a thread. Requires the thread is not archived. */ export async function leaveThread(bot: Bot, threadId: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.THREAD_ME(threadId)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.THREAD_ME(threadId)); } diff --git a/src/helpers/channels/threads/removeThreadMember.ts b/src/helpers/channels/threads/removeThreadMember.ts index 1dc30c5e8..3cd128a00 100644 --- a/src/helpers/channels/threads/removeThreadMember.ts +++ b/src/helpers/channels/threads/removeThreadMember.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../../bot.ts"; /** Removes a user from a thread. Requires the MANAGE_THREADS permission or that you are the creator of the thread. Also requires the thread is not archived. */ export async function removeThreadMember(bot: Bot, threadId: bigint, userId: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.THREAD_USER(threadId, userId)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.THREAD_USER(threadId, userId)); } diff --git a/src/helpers/discovery/removeDiscoverySubcategory.ts b/src/helpers/discovery/removeDiscoverySubcategory.ts index 7aec290c4..f25b35d90 100644 --- a/src/helpers/discovery/removeDiscoverySubcategory.ts +++ b/src/helpers/discovery/removeDiscoverySubcategory.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../bot.ts"; /** Removes a discovery subcategory from the guild. Requires the MANAGE_GUILD permission. Returns a 204 No Content on success. */ export async function removeDiscoverySubcategory(bot: Bot, guildId: bigint, categoryId: number) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.DISCOVERY_SUBCATEGORY(guildId, categoryId) diff --git a/src/helpers/emojis/deleteEmoji.ts b/src/helpers/emojis/deleteEmoji.ts index e9c63446f..cc77e6c88 100644 --- a/src/helpers/emojis/deleteEmoji.ts +++ b/src/helpers/emojis/deleteEmoji.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../bot.ts"; /** Delete the given emoji. Requires the MANAGE_EMOJIS permission. Returns 204 No Content on success. */ export async function deleteEmoji(bot: Bot, guildId: bigint, id: bigint, reason?: string) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_EMOJI(guildId, id), { + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_EMOJI(guildId, id), { reason, }); } diff --git a/src/helpers/guilds/deleteGuild.ts b/src/helpers/guilds/deleteGuild.ts index c1c4d359b..45b0e1fb5 100644 --- a/src/helpers/guilds/deleteGuild.ts +++ b/src/helpers/guilds/deleteGuild.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event. */ export async function deleteGuild(bot: Bot, guildId: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILDS_BASE(guildId)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILDS_BASE(guildId)); } diff --git a/src/helpers/guilds/leaveGuild.ts b/src/helpers/guilds/leaveGuild.ts index 06d6f1756..fade59ee2 100644 --- a/src/helpers/guilds/leaveGuild.ts +++ b/src/helpers/guilds/leaveGuild.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Leave a guild */ export async function leaveGuild(bot: Bot, guildId: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_LEAVE(guildId)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_LEAVE(guildId)); } diff --git a/src/helpers/integrations/deleteIntegration.ts b/src/helpers/integrations/deleteIntegration.ts index 10d420230..5be3de2af 100644 --- a/src/helpers/integrations/deleteIntegration.ts +++ b/src/helpers/integrations/deleteIntegration.ts @@ -2,9 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Delete the attached integration object for the guild with this id. Requires MANAGE_GUILD permission. */ export async function deleteIntegration(bot: Bot, guildId: bigint, id: bigint) { - return await bot.rest.runMethod( - bot.rest, - "delete", - bot.constants.endpoints.GUILD_INTEGRATION(guildId, id) - ); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_INTEGRATION(guildId, id)); } diff --git a/src/helpers/interactions/commands/deleteApplicationCommand.ts b/src/helpers/interactions/commands/deleteApplicationCommand.ts index d72b7cb68..8450290fc 100644 --- a/src/helpers/interactions/commands/deleteApplicationCommand.ts +++ b/src/helpers/interactions/commands/deleteApplicationCommand.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../../bot.ts"; /** Deletes a slash command. */ export async function deleteApplicationCommand(bot: Bot, id: bigint, guildId?: bigint) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", guildId diff --git a/src/helpers/interactions/commands/deleteInteractionResponse.ts b/src/helpers/interactions/commands/deleteInteractionResponse.ts index 65b8b1a93..0fed0eeaa 100644 --- a/src/helpers/interactions/commands/deleteInteractionResponse.ts +++ b/src/helpers/interactions/commands/deleteInteractionResponse.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../../bot.ts"; /** To delete your response to a slash command. If a message id is not provided, it will default to deleting the original response. */ export async function deleteInteractionResponse(bot: Bot, token: string, messageId?: bigint) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", messageId diff --git a/src/helpers/members/banMember.ts b/src/helpers/members/banMember.ts index fe4bc9655..e0e7cad44 100644 --- a/src/helpers/members/banMember.ts +++ b/src/helpers/members/banMember.ts @@ -3,7 +3,7 @@ import type { Bot } from "../../bot.ts"; /** Ban a user from the guild and optionally delete previous messages sent by the user. Requires the BAN_MEMBERS permission. */ export async function banMember(bot: Bot, guildId: bigint, id: bigint, options?: CreateGuildBan) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "put", bot.constants.endpoints.GUILD_BAN(guildId, id), diff --git a/src/helpers/members/kickMember.ts b/src/helpers/members/kickMember.ts index c2dd61543..d6145521b 100644 --- a/src/helpers/members/kickMember.ts +++ b/src/helpers/members/kickMember.ts @@ -2,10 +2,7 @@ import { Bot } from "../../bot.ts"; /** Kick a member from the server */ export async function kickMember(bot: Bot, guildId: bigint, memberId: bigint, reason?: string) { - return await bot.rest.runMethod( - bot.rest, - "delete", - bot.constants.endpoints.GUILD_MEMBER(guildId, memberId), - { reason } - ); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_MEMBER(guildId, memberId), { + reason, + }); } diff --git a/src/helpers/members/unbanMember.ts b/src/helpers/members/unbanMember.ts index 71bc569c5..2dd874620 100644 --- a/src/helpers/members/unbanMember.ts +++ b/src/helpers/members/unbanMember.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Remove the ban for a user. Requires BAN_MEMBERS permission */ export async function unbanMember(bot: Bot, guildId: bigint, id: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_BAN(guildId, id)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_BAN(guildId, id)); } diff --git a/src/helpers/messages/addReaction.ts b/src/helpers/messages/addReaction.ts index 1f4390a49..855f00e70 100644 --- a/src/helpers/messages/addReaction.ts +++ b/src/helpers/messages/addReaction.ts @@ -8,7 +8,7 @@ export async function addReaction(bot: Bot, channelId: bigint, messageId: bigint reaction = reaction.substring(3, reaction.length - 1); } - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "put", bot.constants.endpoints.CHANNEL_MESSAGE_REACTION_ME(channelId, messageId, encodeURIComponent(reaction)), diff --git a/src/helpers/messages/deleteMessage.ts b/src/helpers/messages/deleteMessage.ts index a828b8698..875e404ea 100644 --- a/src/helpers/messages/deleteMessage.ts +++ b/src/helpers/messages/deleteMessage.ts @@ -10,7 +10,7 @@ export async function deleteMessage( ) { if (delayMilliseconds) await bot.utils.delay(delayMilliseconds); - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.CHANNEL_MESSAGE(channelId, messageId), diff --git a/src/helpers/messages/deleteMessages.ts b/src/helpers/messages/deleteMessages.ts index c7c8a9249..591ad79a8 100644 --- a/src/helpers/messages/deleteMessages.ts +++ b/src/helpers/messages/deleteMessages.ts @@ -10,7 +10,7 @@ export async function deleteMessages(bot: Bot, channelId: bigint, ids: bigint[], console.warn(`This endpoint only accepts a maximum of 100 messages. Deleting the first 100 message ids provided.`); } - return await bot.rest.runMethod(bot.rest, "post", bot.constants.endpoints.CHANNEL_BULK_DELETE(channelId), { + await bot.rest.runMethod(bot.rest, "post", bot.constants.endpoints.CHANNEL_BULK_DELETE(channelId), { messages: ids.splice(0, 100).map((id) => id.toString()), reason, }); diff --git a/src/helpers/messages/pinMessage.ts b/src/helpers/messages/pinMessage.ts index cf5eff916..8421c2ebd 100644 --- a/src/helpers/messages/pinMessage.ts +++ b/src/helpers/messages/pinMessage.ts @@ -2,9 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Pin a message in a channel. Requires MANAGE_MESSAGES. Max pins allowed in a channel = 50. */ export async function pinMessage(bot: Bot, channelId: bigint, messageId: bigint) { - return await bot.rest.runMethod( - bot.rest, - "put", - bot.constants.endpoints.CHANNEL_PIN(channelId, messageId) - ); + await bot.rest.runMethod(bot.rest, "put", bot.constants.endpoints.CHANNEL_PIN(channelId, messageId)); } diff --git a/src/helpers/messages/removeAllReactions.ts b/src/helpers/messages/removeAllReactions.ts index d4f18e13a..3a58c4729 100644 --- a/src/helpers/messages/removeAllReactions.ts +++ b/src/helpers/messages/removeAllReactions.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../bot.ts"; /** Removes all reactions for all emojis on this message. */ export async function removeAllReactions(bot: Bot, channelId: bigint, messageId: bigint) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.CHANNEL_MESSAGE_REACTIONS(channelId, messageId) diff --git a/src/helpers/messages/removeReaction.ts b/src/helpers/messages/removeReaction.ts index e15274565..4dbe2b362 100644 --- a/src/helpers/messages/removeReaction.ts +++ b/src/helpers/messages/removeReaction.ts @@ -14,7 +14,7 @@ export async function removeReaction( reaction = reaction.substring(3, reaction.length - 1); } - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", options?.userId diff --git a/src/helpers/messages/removeReactionEmoji.ts b/src/helpers/messages/removeReactionEmoji.ts index 252b02d80..590876429 100644 --- a/src/helpers/messages/removeReactionEmoji.ts +++ b/src/helpers/messages/removeReactionEmoji.ts @@ -8,7 +8,7 @@ export async function removeReactionEmoji(bot: Bot, channelId: bigint, messageId reaction = reaction.substring(3, reaction.length - 1); } - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.CHANNEL_MESSAGE_REACTION(channelId, messageId, reaction) diff --git a/src/helpers/messages/unpinMessage.ts b/src/helpers/messages/unpinMessage.ts index 6962f6d70..960b94ce3 100644 --- a/src/helpers/messages/unpinMessage.ts +++ b/src/helpers/messages/unpinMessage.ts @@ -2,9 +2,5 @@ import type { Bot } from "../../bot.ts"; export async function unpinMessage(bot: Bot, channelId: bigint, messageId: bigint): Promise { - return await bot.rest.runMethod( - bot.rest, - "delete", - bot.constants.endpoints.CHANNEL_PIN(channelId, messageId) - ); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.CHANNEL_PIN(channelId, messageId)); } diff --git a/src/helpers/roles/addRole.ts b/src/helpers/roles/addRole.ts index 2e1a618f2..e668c2b66 100644 --- a/src/helpers/roles/addRole.ts +++ b/src/helpers/roles/addRole.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../bot.ts"; /** Add a role to the member */ export async function addRole(bot: Bot, guildId: bigint, memberId: bigint, roleId: bigint, reason?: string) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "put", bot.constants.endpoints.GUILD_MEMBER_ROLE(guildId, memberId, roleId), diff --git a/src/helpers/roles/deleteRole.ts b/src/helpers/roles/deleteRole.ts index af217256a..7cb8cb24b 100644 --- a/src/helpers/roles/deleteRole.ts +++ b/src/helpers/roles/deleteRole.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Delete a guild role. Requires the MANAGE_ROLES permission. */ export async function deleteRole(bot: Bot, guildId: bigint, id: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_ROLE(guildId, id)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.GUILD_ROLE(guildId, id)); } diff --git a/src/helpers/roles/removeRole.ts b/src/helpers/roles/removeRole.ts index b45a7a788..f724691ae 100644 --- a/src/helpers/roles/removeRole.ts +++ b/src/helpers/roles/removeRole.ts @@ -2,7 +2,7 @@ import type { Bot } from "../../bot.ts"; /** Remove a role from the member */ export async function removeRole(bot: Bot, guildId: bigint, memberId: bigint, roleId: bigint, reason?: string) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.GUILD_MEMBER_ROLE(guildId, memberId, roleId), diff --git a/src/helpers/webhooks/deleteWebhook.ts b/src/helpers/webhooks/deleteWebhook.ts index 15b8e1e62..d4b8d4470 100644 --- a/src/helpers/webhooks/deleteWebhook.ts +++ b/src/helpers/webhooks/deleteWebhook.ts @@ -2,5 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a undefined on success */ export async function deleteWebhook(bot: Bot, channelId: bigint, webhookId: bigint) { - return await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.WEBHOOK_ID(webhookId)); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.WEBHOOK_ID(webhookId)); } diff --git a/src/helpers/webhooks/deleteWebhookMessage.ts b/src/helpers/webhooks/deleteWebhookMessage.ts index 608d780b8..6303811ca 100644 --- a/src/helpers/webhooks/deleteWebhookMessage.ts +++ b/src/helpers/webhooks/deleteWebhookMessage.ts @@ -1,7 +1,7 @@ import type { Bot } from "../../bot.ts"; export async function deleteWebhookMessage(bot: Bot, webhookId: bigint, webhookToken: string, messageId: bigint) { - return await bot.rest.runMethod( + await bot.rest.runMethod( bot.rest, "delete", bot.constants.endpoints.WEBHOOK_MESSAGE(webhookId, webhookToken, messageId) diff --git a/src/helpers/webhooks/deleteWebhookWithToken.ts b/src/helpers/webhooks/deleteWebhookWithToken.ts index 2a98aecd6..0591a212c 100644 --- a/src/helpers/webhooks/deleteWebhookWithToken.ts +++ b/src/helpers/webhooks/deleteWebhookWithToken.ts @@ -2,9 +2,5 @@ import type { Bot } from "../../bot.ts"; /** Delete a webhook permanently. Returns a undefined on success */ export async function deleteWebhookWithToken(bot: Bot, webhookId: bigint, webhookToken: string) { - return await bot.rest.runMethod( - bot.rest, - "delete", - bot.constants.endpoints.WEBHOOK(webhookId, webhookToken) - ); + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.WEBHOOK(webhookId, webhookToken)); }