mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
fix: i hate deno fmt
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user