change: prettier code

This commit is contained in:
Skillz4Killz
2021-10-30 15:22:36 +00:00
committed by GitHub Action
parent 3a02c3fa09
commit 8da924e02d
5 changed files with 15 additions and 9 deletions

View File

@@ -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,
});
}

View File

@@ -26,4 +26,4 @@ export function processRateLimitedPaths(rest: RestManager) {
rest.processRateLimitedPaths(rest);
}, 1000);
}
}
}

View File

@@ -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,
};
}

View File

@@ -8,4 +8,4 @@ export interface CreateGuildEmoji {
roles?: bigint[];
/** The reason you are creating this emoji */
reason?: string;
}
}

View File

@@ -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);