plugins: fix errors (#2446)

This commit is contained in:
LTS20050703
2022-09-09 13:10:16 -05:00
committed by GitHub
parent 0dc0f8c52b
commit 4aba5ff72f
38 changed files with 357 additions and 515 deletions
@@ -11,6 +11,6 @@ export async function fetchAndRetrieveMembers(bot: BotWithCache, guildId: bigint
throw new Error("The guild was not found in cache. Unable to fetch members for uncached guild.");
}
await bot.helpers.fetchMembers(guildId, guild.shardId);
await bot.helpers.fetchMembers(guildId, { limit: 0 });
return bot.members.filter((member) => member.guildId === guildId);
}
@@ -1,12 +1,12 @@
import type { Bot, InteractionResponse, Message } from "../deps.ts";
import type { Bot, InteractionResponse } from "../deps.ts";
/** sendInteractionResponse with ephemeral reply */
export function sendPrivateInteractionResponse(
/** sendInteractionResponse with ephemeral reply */
export async function sendPrivateInteractionResponse(
bot: Bot,
id: bigint,
token: string,
options: InteractionResponse,
): Promise<Message | undefined> {
) {
if (options.data && !options.data?.flags) options.data.flags = 64; // private: true
return bot.helpers.sendInteractionResponse(id, token, options);
return await bot.helpers.sendInteractionResponse(id, token, options);
}