diff --git a/src/api/routes/channels/#channel_id/permissions.ts b/src/api/routes/channels/#channel_id/permissions.ts
index e0feb3f9..c80d9a12 100644
--- a/src/api/routes/channels/#channel_id/permissions.ts
+++ b/src/api/routes/channels/#channel_id/permissions.ts
@@ -21,7 +21,7 @@ import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { route } from "@spacebar/api";
-import { ChannelPermissionOverwriteSchema, ChannelPermissionOverwrite, ChannelPermissionOverwriteType } from "@spacebar/schemas"
+import { ChannelPermissionOverwriteSchema, ChannelPermissionOverwrite, ChannelPermissionOverwriteType } from "@spacebar/schemas";
const router: Router = Router({ mergeParams: true });
// TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel)
diff --git a/src/api/routes/channels/#channel_id/pins.ts b/src/api/routes/channels/#channel_id/pins.ts
index a5aecda7..4b62115f 100644
--- a/src/api/routes/channels/#channel_id/pins.ts
+++ b/src/api/routes/channels/#channel_id/pins.ts
@@ -17,16 +17,7 @@
*/
import { route } from "@spacebar/api";
-import {
- ChannelPinsUpdateEvent,
- Config,
- DiscordApiErrors,
- emitEvent,
- Message,
- MessageCreateEvent,
- MessageUpdateEvent,
- User,
-} from "@spacebar/util";
+import { ChannelPinsUpdateEvent, Config, DiscordApiErrors, emitEvent, Message, MessageCreateEvent, MessageUpdateEvent, User } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { IsNull, Not } from "typeorm";
@@ -62,8 +53,7 @@ router.put(
});
const { maxPins } = Config.get().limits.channel;
- if (pinned_count >= maxPins)
- throw DiscordApiErrors.MAXIMUM_PINS.withParams(maxPins);
+ if (pinned_count >= maxPins) throw DiscordApiErrors.MAXIMUM_PINS.withParams(maxPins);
message.pinned_at = new Date();
diff --git a/src/api/routes/channels/#channel_id/purge.ts b/src/api/routes/channels/#channel_id/purge.ts
index c8a2efab..9686bc20 100644
--- a/src/api/routes/channels/#channel_id/purge.ts
+++ b/src/api/routes/channels/#channel_id/purge.ts
@@ -17,14 +17,7 @@
*/
import { route } from "@spacebar/api";
-import {
- Channel,
- Message,
- MessageDeleteBulkEvent,
- emitEvent,
- getPermission,
- getRights,
-} from "@spacebar/util";
+import { Channel, Message, MessageDeleteBulkEvent, emitEvent, getPermission, getRights } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { Between, FindManyOptions, FindOperator, Not } from "typeorm";
@@ -56,17 +49,12 @@ router.post(
where: { id: channel_id },
});
- if (!channel.guild_id)
- throw new HTTPError("Can't purge dm channels", 400);
+ if (!channel.guild_id) throw new HTTPError("Can't purge dm channels", 400);
isTextChannel(channel.type);
const rights = await getRights(req.user_id);
if (!rights.has("MANAGE_MESSAGES")) {
- const permissions = await getPermission(
- req.user_id,
- channel.guild_id,
- channel_id,
- );
+ const permissions = await getPermission(req.user_id, channel.guild_id, channel_id);
permissions.hasThrow("MANAGE_MESSAGES");
permissions.hasThrow("MANAGE_CHANNELS");
}
@@ -83,21 +71,10 @@ router.post(
where: {
channel_id,
id: Between(after, before), // the right way around
- author_id: rights.has("SELF_DELETE_MESSAGES")
- ? undefined
- : Not(req.user_id),
+ author_id: rights.has("SELF_DELETE_MESSAGES") ? undefined : Not(req.user_id),
// if you lack the right of self-deletion, you can't delete your own messages, even in purges
},
- relations: [
- "author",
- "webhook",
- "application",
- "mentions",
- "mention_roles",
- "mention_channels",
- "sticker_items",
- "attachments",
- ],
+ relations: ["author", "webhook", "application", "mentions", "mention_roles", "mention_channels", "sticker_items", "attachments"],
};
const messages = await Message.find(query);
diff --git a/src/api/routes/channels/#channel_id/webhooks.ts b/src/api/routes/channels/#channel_id/webhooks.ts
index cddff713..106d8442 100644
--- a/src/api/routes/channels/#channel_id/webhooks.ts
+++ b/src/api/routes/channels/#channel_id/webhooks.ts
@@ -17,16 +17,7 @@
*/
import { route } from "@spacebar/api";
-import {
- Channel,
- Config,
- DiscordApiErrors,
- User,
- Webhook,
- handleFile,
- trimSpecial,
- ValidateName,
-} from "@spacebar/util";
+import { Channel, Config, DiscordApiErrors, User, Webhook, handleFile, trimSpecial, ValidateName } from "@spacebar/util";
import crypto from "crypto";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
@@ -37,8 +28,7 @@ const router: Router = Router({ mergeParams: true });
router.get(
"/",
route({
- description:
- "Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission.",
+ description: "Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission.",
permission: "MANAGE_WEBHOOKS",
responses: {
200: {
@@ -50,27 +40,14 @@ router.get(
const { channel_id } = req.params;
const webhooks = await Webhook.find({
where: { channel_id },
- relations: [
- "user",
- "channel",
- "source_channel",
- "guild",
- "source_guild",
- "application",
- ],
+ relations: ["user", "channel", "source_channel", "guild", "source_guild", "application"],
});
- const instanceUrl =
- Config.get().api.endpointPublic || "http://localhost:3001";
+ const instanceUrl = Config.get().api.endpointPublic || "http://localhost:3001";
return res.json(
webhooks.map((webhook) => ({
...webhook,
- url:
- instanceUrl +
- "/webhooks/" +
- webhook.id +
- "/" +
- webhook.token,
+ url: instanceUrl + "/webhooks/" + webhook.id + "/" + webhook.token,
})),
);
},
@@ -103,8 +80,7 @@ router.post(
const webhook_count = await Webhook.count({ where: { channel_id } });
const { maxWebhooks } = Config.get().limits.channel;
- if (maxWebhooks && webhook_count > maxWebhooks)
- throw DiscordApiErrors.MAXIMUM_WEBHOOKS.withParams(maxWebhooks);
+ if (maxWebhooks && webhook_count > maxWebhooks) throw DiscordApiErrors.MAXIMUM_WEBHOOKS.withParams(maxWebhooks);
let { avatar, name } = req.body as WebhookCreateSchema;
name = trimSpecial(name);
diff --git a/src/api/routes/channels/preload-messages.ts b/src/api/routes/channels/preload-messages.ts
index 47795703..cdfc58f0 100644
--- a/src/api/routes/channels/preload-messages.ts
+++ b/src/api/routes/channels/preload-messages.ts
@@ -19,7 +19,7 @@
import { route } from "@spacebar/api";
import { Config, Message } from "@spacebar/util";
import { Request, Response, Router } from "express";
-import { PreloadMessagesRequestSchema, PreloadMessagesResponseSchema } from "@spacebar/schemas"
+import { PreloadMessagesRequestSchema, PreloadMessagesResponseSchema } from "@spacebar/schemas";
const router = Router({ mergeParams: true });
router.post(
diff --git a/src/schemas/Identifiers.ts b/src/schemas/Identifiers.ts
index 5b462c1d..ffdc456a 100644
--- a/src/schemas/Identifiers.ts
+++ b/src/schemas/Identifiers.ts
@@ -26,4 +26,4 @@
* number of ms since Discord epoch worker pid increment
* ```
*/
-export type Snowflake = string;
\ No newline at end of file
+export type Snowflake = string;
diff --git a/src/schemas/api/channels/Webhook.ts b/src/schemas/api/channels/Webhook.ts
index 7f200ec8..510916ce 100644
--- a/src/schemas/api/channels/Webhook.ts
+++ b/src/schemas/api/channels/Webhook.ts
@@ -2,4 +2,4 @@ export enum WebhookType {
Incoming = 1,
ChannelFollower = 2,
Application = 3,
-}
\ No newline at end of file
+}
diff --git a/src/schemas/api/developers/Team.ts b/src/schemas/api/developers/Team.ts
index 94ddb8a5..131e9fb0 100644
--- a/src/schemas/api/developers/Team.ts
+++ b/src/schemas/api/developers/Team.ts
@@ -6,4 +6,4 @@ export enum TeamMemberRole {
ADMIN = "admin",
DEVELOPER = "developer",
READ_ONLY = "read_only",
-}
\ No newline at end of file
+}
diff --git a/src/schemas/api/guilds/Automod.ts b/src/schemas/api/guilds/Automod.ts
index 473d9887..e7c3ab9b 100644
--- a/src/schemas/api/guilds/Automod.ts
+++ b/src/schemas/api/guilds/Automod.ts
@@ -62,33 +62,35 @@ export enum AutomodRuleActionType {
BLOCK_MESSAGE = 1,
SEND_ALERT_MESSAGE = 2,
TIMEOUT_USER = 3,
- QUARANTINE_USER = 4
+ QUARANTINE_USER = 4,
}
-export type AutomodAction = {
- type: AutomodRuleActionType.BLOCK_MESSAGE;
- metadata: {
- custom_message?: string;
- }
-} | {
- type: AutomodRuleActionType.SEND_ALERT_MESSAGE;
- metadata: {
- channel_id: Snowflake;
- };
-} | {
- type: AutomodRuleActionType.TIMEOUT_USER;
- metadata: {
- duration_seconds: number;
- };
-} | {
- type: AutomodRuleActionType.QUARANTINE_USER;
- metadata: {
- duration_seconds: number;
- };
-};
+export type AutomodAction =
+ | {
+ type: AutomodRuleActionType.BLOCK_MESSAGE;
+ metadata: {
+ custom_message?: string;
+ };
+ }
+ | {
+ type: AutomodRuleActionType.SEND_ALERT_MESSAGE;
+ metadata: {
+ channel_id: Snowflake;
+ };
+ }
+ | {
+ type: AutomodRuleActionType.TIMEOUT_USER;
+ metadata: {
+ duration_seconds: number;
+ };
+ }
+ | {
+ type: AutomodRuleActionType.QUARANTINE_USER;
+ metadata: {
+ duration_seconds: number;
+ };
+ };
// TODO
// eslint-disable-next-line
-export interface AutomodRuleActionMetadata {
-
-}
\ No newline at end of file
+export interface AutomodRuleActionMetadata {}
diff --git a/src/schemas/api/guilds/GuildProfileResponse.ts b/src/schemas/api/guilds/GuildProfileResponse.ts
index 58e4b485..703967ce 100644
--- a/src/schemas/api/guilds/GuildProfileResponse.ts
+++ b/src/schemas/api/guilds/GuildProfileResponse.ts
@@ -26,7 +26,7 @@ export interface GuildProfileResponse {
brand_color_primary: string;
banner_hash: string | null;
game_application_ids: string[];
- game_activity: {[id: string]: GameActivity};
+ game_activity: { [id: string]: GameActivity };
tag: string | null;
badge: GuildBadgeType;
badge_color_primary: string;
@@ -57,7 +57,7 @@ export interface GuildTrait {
export enum GuildVisibilityLevel {
PUBLIC = 1,
RESTRICTED = 2,
- PUBLIC_WITH_RECRUITMENT = 3
+ PUBLIC_WITH_RECRUITMENT = 3,
}
export enum GuildBadgeType {
@@ -93,4 +93,3 @@ export enum GuildBadgeType {
MONEY_BAG = 29,
DOLLAR_SIGN = 30,
}
-
diff --git a/src/schemas/api/guilds/Role.ts b/src/schemas/api/guilds/Role.ts
index 3775b312..f9b01000 100644
--- a/src/schemas/api/guilds/Role.ts
+++ b/src/schemas/api/guilds/Role.ts
@@ -10,4 +10,4 @@ export class RoleColors {
tertiary_color: this.tertiary_color ?? undefined,
};
}
-}
\ No newline at end of file
+}
diff --git a/src/schemas/api/guilds/VoiceState.ts b/src/schemas/api/guilds/VoiceState.ts
index 1c8d2222..b2275c70 100644
--- a/src/schemas/api/guilds/VoiceState.ts
+++ b/src/schemas/api/guilds/VoiceState.ts
@@ -17,8 +17,6 @@ export enum PublicVoiceStateEnum {
export type PublicVoiceStateKeys = keyof typeof PublicVoiceStateEnum;
-export const PublicVoiceStateProjection = Object.values(
- PublicVoiceStateEnum,
-).filter((x) => typeof x === "string") as PublicVoiceStateKeys[];
+export const PublicVoiceStateProjection = Object.values(PublicVoiceStateEnum).filter((x) => typeof x === "string") as PublicVoiceStateKeys[];
export type PublicVoiceState = Pick<VoiceState, PublicVoiceStateKeys>;
diff --git a/src/schemas/api/messages/Components.ts b/src/schemas/api/messages/Components.ts
index 1415dea0..96929ac4 100644
--- a/src/schemas/api/messages/Components.ts
+++ b/src/schemas/api/messages/Components.ts
@@ -24,12 +24,7 @@ export interface MessageComponent {
export interface ActionRowComponent extends MessageComponent {
type: MessageComponentType.ActionRow;
- components: (
- | ButtonComponent
- | StringSelectMenuComponent
- | SelectMenuComponent
- | TextInputComponent
- )[];
+ components: (ButtonComponent | StringSelectMenuComponent | SelectMenuComponent | TextInputComponent)[];
}
export interface ButtonComponent extends MessageComponent {
@@ -113,4 +108,4 @@ export enum MessageComponentType {
RoleSelect = 6,
MentionableSelect = 7,
ChannelSelect = 8,
-}
\ No newline at end of file
+}
diff --git a/src/schemas/api/messages/Message.ts b/src/schemas/api/messages/Message.ts
index 485e8642..30eccc76 100644
--- a/src/schemas/api/messages/Message.ts
+++ b/src/schemas/api/messages/Message.ts
@@ -46,7 +46,6 @@ export enum MessageType {
UNHANDLED = 255,
}
-
/**
* https://docs.discord.food/resources/message#partial-message-structure
*/
diff --git a/src/schemas/api/messages/Polls.ts b/src/schemas/api/messages/Polls.ts
index c75717db..d642388f 100644
--- a/src/schemas/api/messages/Polls.ts
+++ b/src/schemas/api/messages/Polls.ts
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { PartialEmoji } from "@spacebar/schemas"
+import { PartialEmoji } from "@spacebar/schemas";
export interface Poll {
question: PollMedia;
diff --git a/src/schemas/api/users/ConnectedAccount.ts b/src/schemas/api/users/ConnectedAccount.ts
index 66c9aea4..a6230340 100644
--- a/src/schemas/api/users/ConnectedAccount.ts
+++ b/src/schemas/api/users/ConnectedAccount.ts
@@ -1,6 +1,3 @@
import { ConnectedAccount } from "@spacebar/util";
-export type PublicConnectedAccount = Pick<
- ConnectedAccount,
- "name" | "type" | "verified"
->;
\ No newline at end of file
+export type PublicConnectedAccount = Pick<ConnectedAccount, "name" | "type" | "verified">;
diff --git a/src/schemas/api/users/Member.ts b/src/schemas/api/users/Member.ts
index 1acd441c..025e4e14 100644
--- a/src/schemas/api/users/Member.ts
+++ b/src/schemas/api/users/Member.ts
@@ -92,4 +92,4 @@ export const PublicMemberProjection: PublicMemberKeys[] = [
export type PublicMember = Omit<Pick<Member, PublicMemberKeys>, "roles"> & {
user: PublicUser;
roles: string[]; // only role ids not objects
-};
\ No newline at end of file
+};
diff --git a/src/schemas/api/users/SessionsSchemas.ts b/src/schemas/api/users/SessionsSchemas.ts
index 583b3490..b7c509be 100644
--- a/src/schemas/api/users/SessionsSchemas.ts
+++ b/src/schemas/api/users/SessionsSchemas.ts
@@ -20,7 +20,7 @@ import { ActivitySchema, Snowflake } from "@spacebar/schemas";
import { ClientStatus } from "@spacebar/util";
export type SessionsLogoutSchema = { session_ids?: Snowflake[]; session_id_hashes?: string[] };
-export type GetSessionsResponse = { user_sessions: DeviceInfo[]; };
+export type GetSessionsResponse = { user_sessions: DeviceInfo[] };
export type DeviceInfo = {
id: string;
@@ -38,4 +38,4 @@ export type DeviceInfo = {
last_seen?: Date;
last_seen_ip?: string;
last_seen_location?: string;
-};
\ No newline at end of file
+};
diff --git a/src/schemas/api/users/index.ts b/src/schemas/api/users/index.ts
index 5c507121..6400f42d 100644
--- a/src/schemas/api/users/index.ts
+++ b/src/schemas/api/users/index.ts
@@ -19,4 +19,4 @@ export * from "./ConnectedAccount";
export * from "./InstanceUserDeleteSchema";
export * from "./Member";
export * from "./User";
-export * from "./UserSettings";
\ No newline at end of file
+export * from "./UserSettings";
diff --git a/src/schemas/responses/APIErrorOrCaptchaResponse.ts b/src/schemas/responses/APIErrorOrCaptchaResponse.ts
index fd89a478..be9becde 100644
--- a/src/schemas/responses/APIErrorOrCaptchaResponse.ts
+++ b/src/schemas/responses/APIErrorOrCaptchaResponse.ts
@@ -19,6 +19,4 @@
import { APIErrorResponse } from "./APIErrorResponse";
import { CaptchaRequiredResponse } from "./CaptchaRequiredResponse";
-export type APIErrorOrCaptchaResponse =
- | CaptchaRequiredResponse
- | APIErrorResponse;
+export type APIErrorOrCaptchaResponse = CaptchaRequiredResponse | APIErrorResponse;
diff --git a/src/schemas/responses/AccountStandingResponse.ts b/src/schemas/responses/AccountStandingResponse.ts
index b2992c74..ea345be9 100644
--- a/src/schemas/responses/AccountStandingResponse.ts
+++ b/src/schemas/responses/AccountStandingResponse.ts
@@ -132,7 +132,7 @@ export interface Classification {
export enum GuildMemberType {
OWNER = 1,
- MEMBER = 2
+ MEMBER = 2,
}
export interface GuildMetadata {
diff --git a/src/schemas/responses/DmMessagesResponseSchema.ts b/src/schemas/responses/DmMessagesResponseSchema.ts
index 62347ef0..c6f9b136 100644
--- a/src/schemas/responses/DmMessagesResponseSchema.ts
+++ b/src/schemas/responses/DmMessagesResponseSchema.ts
@@ -16,6 +16,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { PartialMessage } from "@spacebar/schemas"
+import { PartialMessage } from "@spacebar/schemas";
export type DmMessagesResponseSchema = PartialMessage[];
diff --git a/src/schemas/responses/GuildCreateResponse.ts b/src/schemas/responses/GuildCreateResponse.ts
index 79331d2a..afbf73cb 100644
--- a/src/schemas/responses/GuildCreateResponse.ts
+++ b/src/schemas/responses/GuildCreateResponse.ts
@@ -17,7 +17,7 @@
*/
import { GuildWelcomeScreen } from "@spacebar/util";
-import { GuildUpdateSchema } from "@spacebar/schemas"
+import { GuildUpdateSchema } from "@spacebar/schemas";
export interface GuildCreateResponse extends Omit<GuildUpdateSchema, "name"> {
id: string;
diff --git a/src/schemas/responses/GuildMessagesSearchResponse.ts b/src/schemas/responses/GuildMessagesSearchResponse.ts
index 9e7da5e4..cf59786a 100644
--- a/src/schemas/responses/GuildMessagesSearchResponse.ts
+++ b/src/schemas/responses/GuildMessagesSearchResponse.ts
@@ -16,10 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {
- Attachment,
- Role,
-} from "../../util/entities";
+import { Attachment, Role } from "../../util/entities";
import { ActionRowComponent, Embed, MessageType, Poll, PublicUser } from "@spacebar/schemas";
export interface GuildMessagesSearchMessage {
diff --git a/src/schemas/responses/GuildVanityUrl.ts b/src/schemas/responses/GuildVanityUrl.ts
index c6595a66..c96049f7 100644
--- a/src/schemas/responses/GuildVanityUrl.ts
+++ b/src/schemas/responses/GuildVanityUrl.ts
@@ -25,10 +25,7 @@ export interface GuildVanityUrlNoInvite {
code: null;
}
-export type GuildVanityUrlResponse =
- | GuildVanityUrl
- | GuildVanityUrl[]
- | GuildVanityUrlNoInvite;
+export type GuildVanityUrlResponse = GuildVanityUrl | GuildVanityUrl[] | GuildVanityUrlNoInvite;
export interface GuildVanityUrlCreateResponse {
code: string;
diff --git a/src/schemas/responses/MemberJoinGuildResponse.ts b/src/schemas/responses/MemberJoinGuildResponse.ts
index 1ef78eaa..adef59ce 100644
--- a/src/schemas/responses/MemberJoinGuildResponse.ts
+++ b/src/schemas/responses/MemberJoinGuildResponse.ts
@@ -17,7 +17,7 @@
*/
import { Emoji, Role, Sticker } from "../../util/entities";
-import { GuildCreateResponse } from "@spacebar/schemas"
+import { GuildCreateResponse } from "@spacebar/schemas";
export interface MemberJoinGuildResponse {
guild: GuildCreateResponse;
diff --git a/src/schemas/responses/PreloadMessagesResponseSchema.ts b/src/schemas/responses/PreloadMessagesResponseSchema.ts
index 9452896e..0edb6a71 100644
--- a/src/schemas/responses/PreloadMessagesResponseSchema.ts
+++ b/src/schemas/responses/PreloadMessagesResponseSchema.ts
@@ -18,4 +18,4 @@
import { Message } from "@spacebar/util";
-export type PreloadMessagesResponseSchema = Message[];
\ No newline at end of file
+export type PreloadMessagesResponseSchema = Message[];
diff --git a/src/schemas/responses/UploadAttachmentResponseSchema.ts b/src/schemas/responses/UploadAttachmentResponseSchema.ts
index eab5f22e..7d32ead3 100644
--- a/src/schemas/responses/UploadAttachmentResponseSchema.ts
+++ b/src/schemas/responses/UploadAttachmentResponseSchema.ts
@@ -16,7 +16,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-
export interface UploadAttachmentResponseSchema {
attachments: UploadAttachmentResponse[];
}
diff --git a/src/schemas/responses/UserProfileResponse.ts b/src/schemas/responses/UserProfileResponse.ts
index 1a5fdc97..ee1eee62 100644
--- a/src/schemas/responses/UserProfileResponse.ts
+++ b/src/schemas/responses/UserProfileResponse.ts
@@ -16,33 +16,19 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {
- Badge,
- Member,
- User,
-} from "@spacebar/util";
-import {
- PublicConnectedAccount,
- PublicMember,
- PublicUser,
-} from "@spacebar/schemas";
+import { Badge, Member, User } from "@spacebar/util";
+import { PublicConnectedAccount, PublicMember, PublicUser } from "@spacebar/schemas";
export type MutualGuild = {
id: string;
nick?: string;
};
-export type PublicMemberProfile = Pick<
- Member,
- "banner" | "bio" | "guild_id"
-> & {
+export type PublicMemberProfile = Pick<Member, "banner" | "bio" | "guild_id"> & {
accent_color: null; // TODO
};
-export type UserProfile = Pick<
- User,
- "bio" | "accent_color" | "banner" | "pronouns" | "theme_colors"
->;
+export type UserProfile = Pick<User, "bio" | "accent_color" | "banner" | "pronouns" | "theme_colors">;
export interface UserProfileResponse {
user: PublicUser;
diff --git a/src/schemas/responses/UserRelationsResponse.ts b/src/schemas/responses/UserRelationsResponse.ts
index 808dd3d3..377cab09 100644
--- a/src/schemas/responses/UserRelationsResponse.ts
+++ b/src/schemas/responses/UserRelationsResponse.ts
@@ -17,8 +17,4 @@
*/
import { User } from "@spacebar/util";
-export type UserRelationsResponse = (Pick<User, "id"> &
- Pick<User, "username"> &
- Pick<User, "discriminator"> &
- Pick<User, "avatar"> &
- Pick<User, "public_flags">)[];
+export type UserRelationsResponse = (Pick<User, "id"> & Pick<User, "username"> & Pick<User, "discriminator"> & Pick<User, "avatar"> & Pick<User, "public_flags">)[];
diff --git a/src/schemas/responses/UserRelationshipsResponse.ts b/src/schemas/responses/UserRelationshipsResponse.ts
index a0f5ff5f..0f120544 100644
--- a/src/schemas/responses/UserRelationshipsResponse.ts
+++ b/src/schemas/responses/UserRelationshipsResponse.ts
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { PublicUser, RelationshipType } from "@spacebar/schemas"
+import { PublicUser, RelationshipType } from "@spacebar/schemas";
export interface UserRelationshipsResponse {
id: string;
diff --git a/src/schemas/uncategorised/AutomodRuleSchema.ts b/src/schemas/uncategorised/AutomodRuleSchema.ts
index bc751085..38e8faed 100644
--- a/src/schemas/uncategorised/AutomodRuleSchema.ts
+++ b/src/schemas/uncategorised/AutomodRuleSchema.ts
@@ -45,11 +45,7 @@ export interface AutomodRuleSchema {
name: string;
position: number;
trigger_type: number; //AutomodTriggerTypes
- trigger_metadata:
- | AutomodMentionSpamRuleSchema
- | AutomodSuspectedSpamRuleSchema
- | AutomodCommonlyFlaggedWordsRuleSchema
- | AutomodCustomWordsRuleSchema;
+ trigger_metadata: AutomodMentionSpamRuleSchema | AutomodSuspectedSpamRuleSchema | AutomodCommonlyFlaggedWordsRuleSchema | AutomodCustomWordsRuleSchema;
}
export interface AutomodRuleSchemaWithId extends AutomodRuleSchema {
diff --git a/src/schemas/uncategorised/GreetRequestSchema.ts b/src/schemas/uncategorised/GreetRequestSchema.ts
index 28d1fddc..2a580f1c 100644
--- a/src/schemas/uncategorised/GreetRequestSchema.ts
+++ b/src/schemas/uncategorised/GreetRequestSchema.ts
@@ -21,10 +21,10 @@ import { AllowedMentions } from "@spacebar/schemas";
export interface GreetRequestSchema {
sticker_ids: string[];
allowed_mentions?: AllowedMentions;
- message_reference?: {
+ message_reference?: {
message_id: string;
channel_id?: string;
guild_id?: string;
fail_if_not_exists?: boolean;
};
-}
\ No newline at end of file
+}
diff --git a/src/schemas/uncategorised/MessageAcknowledgeSchema.ts b/src/schemas/uncategorised/MessageAcknowledgeSchema.ts
index 9df60622..0075fb31 100644
--- a/src/schemas/uncategorised/MessageAcknowledgeSchema.ts
+++ b/src/schemas/uncategorised/MessageAcknowledgeSchema.ts
@@ -42,4 +42,4 @@ export enum ReadStateFlags {
IS_GUILD_CHANNEL = 1 << 0,
IS_THREAD = 1 << 1,
IS_MENTION_LOW_IMPORTANCE = 1 << 2,
-}
\ No newline at end of file
+}
diff --git a/src/schemas/uncategorised/RelationshipPutSchema.ts b/src/schemas/uncategorised/RelationshipPutSchema.ts
index 4d2438ee..563e46dc 100644
--- a/src/schemas/uncategorised/RelationshipPutSchema.ts
+++ b/src/schemas/uncategorised/RelationshipPutSchema.ts
@@ -25,4 +25,4 @@ export enum RelationshipType {
incoming = 3,
blocked = 2,
friends = 1,
-}
\ No newline at end of file
+}
diff --git a/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts b/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts
index 2b930bc0..a7e884e1 100644
--- a/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts
+++ b/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts
@@ -44,4 +44,4 @@ export interface SettingsProtoUpdateJsonSchema {
// export interface SettingsProtoUpdateTestSettingsSchema {
// settings: {};
// required_data_version?: number;
-// }
\ No newline at end of file
+// }
diff --git a/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts b/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts
index 60bf89f6..0ad3a7cf 100644
--- a/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts
+++ b/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts
@@ -16,7 +16,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-
export interface UploadAttachmentRequestSchema {
files: UploadAttachmentRequest[];
}
diff --git a/src/schemas/uncategorised/UserGuildSettingsSchema.ts b/src/schemas/uncategorised/UserGuildSettingsSchema.ts
index d0fe24fc..20de7e5f 100644
--- a/src/schemas/uncategorised/UserGuildSettingsSchema.ts
+++ b/src/schemas/uncategorised/UserGuildSettingsSchema.ts
@@ -19,8 +19,7 @@
import { ChannelOverride, UserGuildSettings } from "@spacebar/schemas";
// This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema
-export interface UserGuildSettingsSchema
- extends Partial<Omit<UserGuildSettings, "channel_overrides">> {
+export interface UserGuildSettingsSchema extends Partial<Omit<UserGuildSettings, "channel_overrides">> {
channel_overrides?: {
[channel_id: string]: ChannelOverride;
};
diff --git a/src/schemas/uncategorised/WebAuthnSchema.ts b/src/schemas/uncategorised/WebAuthnSchema.ts
index 3f5e0da7..ada20de1 100644
--- a/src/schemas/uncategorised/WebAuthnSchema.ts
+++ b/src/schemas/uncategorised/WebAuthnSchema.ts
@@ -28,9 +28,7 @@ export interface CreateWebAuthnCredentialSchema {
ticket: string;
}
-export type WebAuthnPostSchema =
- | GenerateWebAuthnCredentialsSchema
- | CreateWebAuthnCredentialSchema;
+export type WebAuthnPostSchema = GenerateWebAuthnCredentialsSchema | CreateWebAuthnCredentialSchema;
export interface WebAuthnTotpSchema {
code: string;
diff --git a/src/schemas/uncategorised/WebhookExecuteSchema.ts b/src/schemas/uncategorised/WebhookExecuteSchema.ts
index d95606c3..4957c02d 100644
--- a/src/schemas/uncategorised/WebhookExecuteSchema.ts
+++ b/src/schemas/uncategorised/WebhookExecuteSchema.ts
@@ -16,11 +16,8 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { Embed } from "@spacebar/schemas"
-import {
- MessageCreateAttachment,
- PollCreationSchema,
-} from "./MessageCreateSchema";
+import { Embed } from "@spacebar/schemas";
+import { MessageCreateAttachment, PollCreationSchema } from "./MessageCreateSchema";
export interface WebhookExecuteSchema {
content?: string;
diff --git a/src/util/util/DateBuilder.ts b/src/util/util/DateBuilder.ts
index e9c623a9..cb71a338 100644
--- a/src/util/util/DateBuilder.ts
+++ b/src/util/util/DateBuilder.ts
@@ -89,4 +89,4 @@ export class DateBuilder {
buildTimestamp() {
return this.date.getTime();
}
-}
\ No newline at end of file
+}
diff --git a/src/util/util/ElapsedTime.test.ts b/src/util/util/ElapsedTime.test.ts
index 012ecfaf..dc9a82e0 100644
--- a/src/util/util/ElapsedTime.test.ts
+++ b/src/util/util/ElapsedTime.test.ts
@@ -75,4 +75,4 @@ test("ElapsedTime should return correct hours", () => {
test("ElapsedTime should return correct days", () => {
const db = new ElapsedTime(172800000000000n); // 2 days
assert.equal(db.days, 2);
-});
\ No newline at end of file
+});
diff --git a/src/util/util/ElapsedTime.ts b/src/util/util/ElapsedTime.ts
index 08f246a1..e87b886e 100644
--- a/src/util/util/ElapsedTime.ts
+++ b/src/util/util/ElapsedTime.ts
@@ -81,4 +81,4 @@ export class ElapsedTime {
return `${daysPart}${hoursPart}:${minutesPart}:${secondsPart}.${millisecondsPart}${microsecondsPart}${nanosecondsPart}`;
}
-}
\ No newline at end of file
+}
diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts
index cc19d85e..e6dff763 100644
--- a/src/util/util/Token.ts
+++ b/src/util/util/Token.ts
@@ -171,7 +171,7 @@ export async function generateToken(id: string, isAdminSession: boolean = false)
is_admin_session: isAdminSession,
client_status: {},
status: "online",
- client_info: { },
+ client_info: {},
});
} while (await Session.findOne({ where: { session_id: newSession.session_id } }));
|