fix: i hate deno fmt

This commit is contained in:
Skillz4Killz
2022-03-26 00:14:07 +00:00
committed by GitHub
parent 253781943e
commit 54708c97ba
3 changed files with 11 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ export async function getPruneCount(bot: Bot, guildId: bigint, options?: GetGuil
if (options.days) url += `days=${options.days}`;
if (options.includeRoles) url += `&include_roles=${options.includeRoles}`;
}
const result = await bot.rest.runMethod(
bot.rest,
"get",

View File

@@ -23,21 +23,21 @@ export async function getScheduledEventUsers(
): Promise<
Collection<bigint, User> | Collection<bigint, { user: User; member: Member }>
> {
let url = bot.constants.endpoints.GUILD_SCHEDULED_EVENT_USERS(guildId, eventId)
let url = bot.constants.endpoints.GUILD_SCHEDULED_EVENT_USERS(guildId, eventId);
if (options) {
url = "?"
url = "?";
if (options.limit) url += `limit=${options.limit}`;
if (options.withMember) url += `&with_member=${options.withMember}`
if (options.after) url += `&after=${options.after}`
if (options.before) url += `&before=${options.before}`
if (options.withMember) url += `&with_member=${options.withMember}`;
if (options.after) url += `&after=${options.after}`;
if (options.before) url += `&before=${options.before}`;
}
const result = await bot.rest.runMethod<{ user: DiscordUser; member?: DiscordMember }[]>(
bot.rest,
"get",
url
url,
);
if (!options?.withMember) {

View File

@@ -14,7 +14,7 @@ export async function getMessages(
let url = bot.constants.endpoints.CHANNEL_MESSAGES(channelId);
if (options) {
url += "?"
url += "?";
if (isGetMessagesAfter(options) && options.after) url += `after=${options.after}`;
if (isGetMessagesBefore(options) && options.before) url += `&before=${options.before}`;
if (isGetMessagesAround(options) && options.around) url += `&around=${options.around}`;
@@ -24,7 +24,7 @@ export async function getMessages(
const result = await bot.rest.runMethod<DiscordMessage[]>(
bot.rest,
"get",
url
url,
);
return await Promise.all(result.map((res) => bot.transformers.message(bot, res)));
@@ -70,4 +70,4 @@ export function isGetMessagesAround(options: GetMessagesOptions): options is Get
export function isGetMessagesLimit(options: GetMessagesOptions): options is GetMessagesLimit {
return Reflect.has(options, "limit");
}
}