mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
change: prettier code
This commit is contained in:
committed by
GitHub Action
parent
3a02c3fa09
commit
8da924e02d
@@ -13,7 +13,7 @@ export async function deleteMessages(bot: Bot, channelId: bigint, ids: bigint[],
|
||||
}
|
||||
|
||||
return await bot.rest.runMethod<undefined>(bot.rest, "post", bot.constants.endpoints.CHANNEL_BULK_DELETE(channelId), {
|
||||
messages: ids.splice(0, 100).map(id => id.toString()),
|
||||
messages: ids.splice(0, 100).map((id) => id.toString()),
|
||||
reason,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,4 +26,4 @@ export function processRateLimitedPaths(rest: RestManager) {
|
||||
rest.processRateLimitedPaths(rest);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { Bot } from "../bot.ts";
|
||||
import { ApplicationCommandInteractionData, ButtonData, DiscordInteractionTypes, Interaction, SelectMenuData } from "../types/mod.ts";
|
||||
import {
|
||||
ApplicationCommandInteractionData,
|
||||
ButtonData,
|
||||
DiscordInteractionTypes,
|
||||
Interaction,
|
||||
SelectMenuData,
|
||||
} from "../types/mod.ts";
|
||||
import { SnakeCasedPropertiesDeep } from "../types/util.ts";
|
||||
import { DiscordenoMember, DiscordenoUser } from "./member.ts";
|
||||
import { DiscordenoMessage } from "./message.ts";
|
||||
@@ -23,7 +29,7 @@ export function transformInteraction(bot: Bot, payload: SnakeCasedPropertiesDeep
|
||||
channelId: payload.channel_id ? bot.transformers.snowflake(payload.channel_id) : undefined,
|
||||
member: payload.member && guildId ? bot.transformers.member(bot, payload.member, guildId, user.id) : undefined,
|
||||
// TODO: CamelCase INTERACTION DATA
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
data: payload.data,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ export interface CreateGuildEmoji {
|
||||
roles?: bigint[];
|
||||
/** The reason you are creating this emoji */
|
||||
reason?: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export async function addReactionTest(
|
||||
bot: Bot,
|
||||
guildId: bigint,
|
||||
channelId: bigint,
|
||||
options: { custom: boolean; single: boolean, ordered: boolean; },
|
||||
options: { custom: boolean; single: boolean; ordered: boolean },
|
||||
t: Deno.TestContext
|
||||
) {
|
||||
const message = await bot.helpers.sendMessage(channelId, "Hello World!");
|
||||
@@ -60,13 +60,13 @@ export async function addReactionTest(
|
||||
}
|
||||
|
||||
let reactions = 0;
|
||||
|
||||
|
||||
bot.events.reactionAdd = function (bot, payload) {
|
||||
if (payload.messageId !== message.id) return;
|
||||
|
||||
|
||||
reactions++;
|
||||
};
|
||||
|
||||
|
||||
if (options.single) await bot.helpers.addReaction(message.channelId, message.id, emojiId);
|
||||
else await bot.helpers.addReactions(message.channelId, message.id, emojiIds, options.ordered);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user