From 095cbf7b2036bc35d9c3eabbdec8a5c6dfd67242 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:52:33 +1100 Subject: Remove ALL fosscord mentions --- src/api/Server.ts | 13 ++++++------- src/api/middlewares/Authentication.ts | 2 +- src/api/middlewares/ErrorHandler.ts | 2 +- src/api/middlewares/RateLimit.ts | 6 +++--- src/api/routes/-/healthz.ts | 4 ++-- src/api/routes/-/readyz.ts | 4 ++-- src/api/routes/applications/#id/bot/index.ts | 4 ++-- src/api/routes/applications/#id/entitlements.ts | 2 +- src/api/routes/applications/#id/index.ts | 4 ++-- src/api/routes/applications/#id/skus.ts | 2 +- src/api/routes/applications/detectable.ts | 2 +- src/api/routes/applications/index.ts | 4 ++-- src/api/routes/auth/forgot.ts | 4 ++-- src/api/routes/auth/generate-registration-tokens.ts | 4 ++-- src/api/routes/auth/location-metadata.ts | 4 ++-- src/api/routes/auth/login.ts | 4 ++-- src/api/routes/auth/logout.ts | 2 +- src/api/routes/auth/mfa/totp.ts | 4 ++-- src/api/routes/auth/mfa/webauthn.ts | 4 ++-- src/api/routes/auth/register.ts | 6 +++--- src/api/routes/auth/reset.ts | 4 ++-- src/api/routes/auth/verify/index.ts | 4 ++-- src/api/routes/auth/verify/resend.ts | 4 ++-- src/api/routes/auth/verify/view-backup-codes-challenge.ts | 4 ++-- src/api/routes/channels/#channel_id/index.ts | 4 ++-- src/api/routes/channels/#channel_id/invites.ts | 6 +++--- .../channels/#channel_id/messages/#message_id/ack.ts | 4 ++-- .../channels/#channel_id/messages/#message_id/crosspost.ts | 2 +- .../channels/#channel_id/messages/#message_id/index.ts | 12 ++++++------ .../channels/#channel_id/messages/#message_id/reactions.ts | 4 ++-- .../routes/channels/#channel_id/messages/bulk-delete.ts | 4 ++-- src/api/routes/channels/#channel_id/messages/index.ts | 6 +++--- src/api/routes/channels/#channel_id/permissions.ts | 4 ++-- src/api/routes/channels/#channel_id/pins.ts | 4 ++-- src/api/routes/channels/#channel_id/purge.ts | 4 ++-- src/api/routes/channels/#channel_id/recipients.ts | 4 ++-- src/api/routes/channels/#channel_id/typing.ts | 4 ++-- src/api/routes/channels/#channel_id/webhooks.ts | 8 ++++---- src/api/routes/discoverable-guilds.ts | 4 ++-- src/api/routes/discovery.ts | 4 ++-- src/api/routes/download.ts | 4 ++-- src/api/routes/experiments.ts | 2 +- src/api/routes/gateway/bot.ts | 4 ++-- src/api/routes/gateway/index.ts | 4 ++-- src/api/routes/gifs/search.ts | 2 +- src/api/routes/gifs/trending-gifs.ts | 2 +- src/api/routes/gifs/trending.ts | 4 ++-- src/api/routes/guild-recommendations.ts | 4 ++-- src/api/routes/guilds/#guild_id/audit-logs.ts | 2 +- src/api/routes/guilds/#guild_id/bans.ts | 4 ++-- src/api/routes/guilds/#guild_id/channels.ts | 4 ++-- src/api/routes/guilds/#guild_id/delete.ts | 4 ++-- src/api/routes/guilds/#guild_id/discovery-requirements.ts | 2 +- src/api/routes/guilds/#guild_id/emojis.ts | 4 ++-- src/api/routes/guilds/#guild_id/index.ts | 8 ++++---- src/api/routes/guilds/#guild_id/integrations.ts | 2 +- src/api/routes/guilds/#guild_id/invites.ts | 4 ++-- src/api/routes/guilds/#guild_id/member-verification.ts | 2 +- .../routes/guilds/#guild_id/members/#member_id/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/members/#member_id/nick.ts | 4 ++-- .../#guild_id/members/#member_id/roles/#role_id/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/members/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/messages/search.ts | 4 ++-- src/api/routes/guilds/#guild_id/premium.ts | 2 +- src/api/routes/guilds/#guild_id/profile/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/prune.ts | 4 ++-- src/api/routes/guilds/#guild_id/regions.ts | 4 ++-- src/api/routes/guilds/#guild_id/roles/#role_id/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/roles/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/stickers.ts | 4 ++-- src/api/routes/guilds/#guild_id/templates.ts | 6 +++--- src/api/routes/guilds/#guild_id/vanity-url.ts | 4 ++-- .../routes/guilds/#guild_id/voice-states/#user_id/index.ts | 4 ++-- src/api/routes/guilds/#guild_id/webhooks.ts | 2 +- src/api/routes/guilds/#guild_id/welcome-screen.ts | 4 ++-- src/api/routes/guilds/#guild_id/widget.json.ts | 4 ++-- src/api/routes/guilds/#guild_id/widget.png.ts | 6 +++--- src/api/routes/guilds/#guild_id/widget.ts | 4 ++-- src/api/routes/guilds/index.ts | 4 ++-- src/api/routes/guilds/templates/index.ts | 6 +++--- src/api/routes/invites/index.ts | 4 ++-- src/api/routes/oauth2/authorize.ts | 4 ++-- src/api/routes/oauth2/tokens.ts | 2 +- src/api/routes/outbound-promotions.ts | 2 +- src/api/routes/partners/#guild_id/requirements.ts | 2 +- src/api/routes/ping.ts | 4 ++-- src/api/routes/policies/instance/domains.ts | 4 ++-- src/api/routes/policies/instance/index.ts | 4 ++-- src/api/routes/policies/instance/limits.ts | 4 ++-- src/api/routes/policies/stats.ts | 4 ++-- src/api/routes/read-states/ack-bulk.ts | 4 ++-- src/api/routes/scheduled-maintenances/upcoming_json.ts | 2 +- src/api/routes/science.ts | 2 +- src/api/routes/stage-instances.ts | 2 +- src/api/routes/sticker-packs/index.ts | 4 ++-- src/api/routes/stickers/#sticker_id/index.ts | 4 ++-- src/api/routes/stop.ts | 2 +- src/api/routes/store/published-listings/applications.ts | 2 +- .../applications/#id/subscription-plans.ts | 2 +- src/api/routes/store/published-listings/skus.ts | 2 +- .../published-listings/skus/#sku_id/subscription-plans.ts | 2 +- src/api/routes/teams.ts | 2 +- src/api/routes/template.ts.disabled | 2 +- src/api/routes/track.ts | 2 +- src/api/routes/updates.ts | 4 ++-- src/api/routes/users/#id/delete.ts | 4 ++-- src/api/routes/users/#id/index.ts | 4 ++-- src/api/routes/users/#id/profile.ts | 4 ++-- src/api/routes/users/#id/relationships.ts | 4 ++-- .../routes/users/@me/activities/statistics/applications.ts | 2 +- src/api/routes/users/@me/affinities/guilds.ts | 2 +- src/api/routes/users/@me/affinities/users.ts | 2 +- .../routes/users/@me/applications/#app_id/entitlements.ts | 2 +- src/api/routes/users/@me/billing/country-code.ts | 2 +- src/api/routes/users/@me/billing/payment-sources.ts | 2 +- src/api/routes/users/@me/billing/subscriptions.ts | 2 +- src/api/routes/users/@me/channels.ts | 4 ++-- src/api/routes/users/@me/connections.ts | 2 +- src/api/routes/users/@me/delete.ts | 4 ++-- src/api/routes/users/@me/devices.ts | 2 +- src/api/routes/users/@me/disable.ts | 4 ++-- src/api/routes/users/@me/email-settings.ts | 2 +- src/api/routes/users/@me/entitlements.ts | 2 +- src/api/routes/users/@me/guilds.ts | 4 ++-- src/api/routes/users/@me/guilds/#guild_id/settings.ts | 4 ++-- .../routes/users/@me/guilds/premium/subscription-slots.ts | 2 +- src/api/routes/users/@me/index.ts | 4 ++-- src/api/routes/users/@me/library.ts | 2 +- src/api/routes/users/@me/mfa/codes-verification.ts | 4 ++-- src/api/routes/users/@me/mfa/codes.ts | 4 ++-- src/api/routes/users/@me/mfa/totp/disable.ts | 4 ++-- src/api/routes/users/@me/mfa/totp/enable.ts | 4 ++-- .../users/@me/mfa/webauthn/credentials/#key_id/index.ts | 4 ++-- src/api/routes/users/@me/mfa/webauthn/credentials/index.ts | 4 ++-- src/api/routes/users/@me/notes.ts | 4 ++-- src/api/routes/users/@me/relationships.ts | 6 +++--- src/api/routes/users/@me/settings.ts | 4 ++-- src/api/routes/voice/regions.ts | 4 ++-- src/api/start.ts | 4 ++-- src/api/util/handlers/Instance.ts | 2 +- src/api/util/handlers/Message.ts | 4 ++-- src/api/util/handlers/Voice.ts | 2 +- src/api/util/handlers/route.ts | 6 +++--- src/api/util/utility/EmbedHandlers.ts | 6 +++--- src/api/util/utility/RandomInviteID.ts | 2 +- src/api/util/utility/String.ts | 2 +- src/api/util/utility/captcha.ts | 4 ++-- src/api/util/utility/ipAddress.ts | 2 +- src/api/util/utility/passwordStrength.ts | 2 +- src/bundle/Server.ts | 10 +++++----- src/bundle/index.ts | 8 ++++---- src/bundle/start.ts | 14 +++++++------- src/bundle/stats.ts | 3 ++- src/cdn/Server.ts | 2 +- src/cdn/routes/attachments.ts | 2 +- src/cdn/routes/avatars.ts | 2 +- src/cdn/routes/guild-profiles.ts | 2 +- src/cdn/routes/role-icons.ts | 2 +- src/gateway/Server.ts | 2 +- src/gateway/events/Close.ts | 4 ++-- src/gateway/events/Connection.ts | 4 ++-- src/gateway/events/Message.ts | 4 ++-- src/gateway/listener/listener.ts | 6 +++--- src/gateway/opcodes/Heartbeat.ts | 2 +- src/gateway/opcodes/Identify.ts | 6 +++--- src/gateway/opcodes/LazyRequest.ts | 4 ++-- src/gateway/opcodes/PresenceUpdate.ts | 4 ++-- src/gateway/opcodes/RequestGuildMembers.ts | 2 +- src/gateway/opcodes/Resume.ts | 2 +- src/gateway/opcodes/VoiceStateUpdate.ts | 4 ++-- src/gateway/opcodes/index.ts | 2 +- src/gateway/opcodes/instanceOf.ts | 2 +- src/gateway/util/Constants.ts | 2 +- src/gateway/util/Send.ts | 4 ++-- src/gateway/util/WebSocket.ts | 4 ++-- src/util/config/types/ApiConfiguration.ts | 1 - src/util/config/types/GeneralConfiguration.ts | 6 +++--- src/util/config/types/RegionConfiguration.ts | 6 +++--- src/util/entities/AuditLog.ts | 2 +- src/util/entities/Emoji.ts | 2 +- src/util/entities/Guild.ts | 4 ++-- src/util/entities/Invite.ts | 2 +- src/util/interfaces/Event.ts | 2 +- src/util/schemas/ActivitySchema.ts | 2 +- src/util/schemas/ChannelModifySchema.ts | 2 +- src/util/schemas/ChannelPermissionOverwriteSchema.ts | 2 +- src/util/schemas/GuildUpdateSchema.ts | 2 +- src/util/schemas/IdentifySchema.ts | 2 +- src/util/schemas/MessageCreateSchema.ts | 2 +- src/util/schemas/RelationshipPutSchema.ts | 2 +- src/util/schemas/UserGuildSettingsSchema.ts | 2 +- src/util/schemas/UserSettingsSchema.ts | 2 +- src/util/util/AutoUpdate.ts | 4 ++-- src/util/util/Constants.ts | 10 +++++----- src/util/util/Database.ts | 2 +- src/util/util/MessageFlags.ts | 4 ++-- src/util/util/Token.ts | 2 +- src/util/util/email/transports/MailGun.ts | 2 +- src/util/util/email/transports/MailJet.ts | 2 +- src/util/util/email/transports/SMTP.ts | 2 +- src/util/util/email/transports/SendGrid.ts | 2 +- src/webrtc/Server.ts | 2 +- src/webrtc/events/Close.ts | 4 ++-- src/webrtc/events/Connection.ts | 2 +- src/webrtc/events/Message.ts | 2 +- src/webrtc/opcodes/BackendVersion.ts | 2 +- src/webrtc/opcodes/Heartbeat.ts | 2 +- src/webrtc/opcodes/Identify.ts | 6 +++--- src/webrtc/opcodes/SelectProtocol.ts | 6 +++--- src/webrtc/opcodes/Speaking.ts | 2 +- src/webrtc/opcodes/Video.ts | 6 +++--- src/webrtc/opcodes/index.ts | 2 +- src/webrtc/util/MediaServer.ts | 2 +- 213 files changed, 378 insertions(+), 379 deletions(-) (limited to 'src') diff --git a/src/api/Server.ts b/src/api/Server.ts index 032e923e..447a4802 100644 --- a/src/api/Server.ts +++ b/src/api/Server.ts @@ -25,7 +25,7 @@ import { registerRoutes, Sentry, WebAuthn, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; import { Server, ServerOptions } from "lambert-server"; import "missing-native-js-functions"; @@ -38,7 +38,6 @@ import { ErrorHandler } from "./middlewares/ErrorHandler"; import { initRateLimits } from "./middlewares/RateLimit"; import { initTranslation } from "./middlewares/Translation"; import { initInstance } from "./util/handlers/Instance"; -import express from "express"; const PUBLIC_ASSETS_FOLDER = path.join( __dirname, @@ -48,21 +47,21 @@ const PUBLIC_ASSETS_FOLDER = path.join( "public", ); -export type FosscordServerOptions = ServerOptions; +export type SpacebarServerOptions = ServerOptions; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace Express { interface Request { - server: FosscordServer; + server: SpacebarServer; } } } -export class FosscordServer extends Server { - public declare options: FosscordServerOptions; +export class SpacebarServer extends Server { + public declare options: SpacebarServerOptions; - constructor(opts?: Partial) { + constructor(opts?: Partial) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore super({ ...opts, errorHandler: false, jsonBody: false }); diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index 400a16f4..09644eee 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { checkToken, Config, Rights } from "@fosscord/util"; +import { checkToken, Config, Rights } from "@spacebar/util"; import * as Sentry from "@sentry/node"; import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; diff --git a/src/api/middlewares/ErrorHandler.ts b/src/api/middlewares/ErrorHandler.ts index 439fce68..b8a73298 100644 --- a/src/api/middlewares/ErrorHandler.ts +++ b/src/api/middlewares/ErrorHandler.ts @@ -18,7 +18,7 @@ import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; -import { ApiError, FieldError } from "@fosscord/util"; +import { ApiError, FieldError } from "@spacebar/util"; const EntityNotFoundErrorRegex = /"(\w+)"/; export function ErrorHandler( diff --git a/src/api/middlewares/RateLimit.ts b/src/api/middlewares/RateLimit.ts index f50d6568..0da292e9 100644 --- a/src/api/middlewares/RateLimit.ts +++ b/src/api/middlewares/RateLimit.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { getIpAdress } from "@fosscord/api"; -import { Config, getRights, listenEvent } from "@fosscord/util"; +import { getIpAdress } from "@spacebar/api"; +import { Config, getRights, listenEvent } from "@spacebar/util"; import { NextFunction, Request, Response, Router } from "express"; import { API_PREFIX_TRAILING_SLASH } from "./Authentication"; @@ -27,7 +27,7 @@ import { API_PREFIX_TRAILING_SLASH } from "./Authentication"; /* ? bucket limit? Max actions/sec per bucket? -(ANSWER: a small fosscord instance might not need a complex rate limiting system) +(ANSWER: a small spacebar instance might not need a complex rate limiting system) TODO: delay database requests to include multiple queries TODO: different for methods (GET/POST) > IP addresses that make too many invalid HTTP requests are automatically and temporarily restricted from accessing the Discord API. Currently, this limit is 10,000 per 10 minutes. An invalid request is one that results in 401, 403, or 429 statuses. diff --git a/src/api/routes/-/healthz.ts b/src/api/routes/-/healthz.ts index 555ccf11..6a2f65de 100644 --- a/src/api/routes/-/healthz.ts +++ b/src/api/routes/-/healthz.ts @@ -17,8 +17,8 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { getDatabase } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { getDatabase } from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/-/readyz.ts b/src/api/routes/-/readyz.ts index 555ccf11..6a2f65de 100644 --- a/src/api/routes/-/readyz.ts +++ b/src/api/routes/-/readyz.ts @@ -17,8 +17,8 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { getDatabase } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { getDatabase } from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/applications/#id/bot/index.ts b/src/api/routes/applications/#id/bot/index.ts index 89e185b4..e3f1832c 100644 --- a/src/api/routes/applications/#id/bot/index.ts +++ b/src/api/routes/applications/#id/bot/index.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Application, generateToken, @@ -25,7 +25,7 @@ import { BotModifySchema, handleFile, DiscordApiErrors, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; import { verifyToken } from "node-2fa"; diff --git a/src/api/routes/applications/#id/entitlements.ts b/src/api/routes/applications/#id/entitlements.ts index fa8609bf..e88fb7f7 100644 --- a/src/api/routes/applications/#id/entitlements.ts +++ b/src/api/routes/applications/#id/entitlements.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/applications/#id/index.ts b/src/api/routes/applications/#id/index.ts index 1cd792ba..067f5dad 100644 --- a/src/api/routes/applications/#id/index.ts +++ b/src/api/routes/applications/#id/index.ts @@ -17,12 +17,12 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Application, DiscordApiErrors, ApplicationModifySchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { verifyToken } from "node-2fa"; import { HTTPError } from "lambert-server"; diff --git a/src/api/routes/applications/#id/skus.ts b/src/api/routes/applications/#id/skus.ts index 973761c3..fcb75423 100644 --- a/src/api/routes/applications/#id/skus.ts +++ b/src/api/routes/applications/#id/skus.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/applications/detectable.ts b/src/api/routes/applications/detectable.ts index 2e972335..a8e30894 100644 --- a/src/api/routes/applications/detectable.ts +++ b/src/api/routes/applications/detectable.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/applications/index.ts b/src/api/routes/applications/index.ts index c4c2c326..80a19aa8 100644 --- a/src/api/routes/applications/index.ts +++ b/src/api/routes/applications/index.ts @@ -17,13 +17,13 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Application, ApplicationCreateSchema, trimSpecial, User, -} from "@fosscord/util"; +} from "@spacebar/util"; const router: Router = Router(); diff --git a/src/api/routes/auth/forgot.ts b/src/api/routes/auth/forgot.ts index 3a3af3cb..e240dff2 100644 --- a/src/api/routes/auth/forgot.ts +++ b/src/api/routes/auth/forgot.ts @@ -16,14 +16,14 @@ along with this program. If not, see . */ -import { getIpAdress, route, verifyCaptcha } from "@fosscord/api"; +import { getIpAdress, route, verifyCaptcha } from "@spacebar/api"; import { Config, Email, FieldErrors, ForgotPasswordSchema, User, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/auth/generate-registration-tokens.ts b/src/api/routes/auth/generate-registration-tokens.ts index 45ebc2e8..723875f8 100644 --- a/src/api/routes/auth/generate-registration-tokens.ts +++ b/src/api/routes/auth/generate-registration-tokens.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { route, random } from "@fosscord/api"; -import { Config, ValidRegistrationToken } from "@fosscord/util"; +import { route, random } from "@spacebar/api"; +import { Config, ValidRegistrationToken } from "@spacebar/util"; import { Request, Response, Router } from "express"; const router: Router = Router(); diff --git a/src/api/routes/auth/location-metadata.ts b/src/api/routes/auth/location-metadata.ts index d7c7adf1..52a45c67 100644 --- a/src/api/routes/auth/location-metadata.ts +++ b/src/api/routes/auth/location-metadata.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { getIpAdress, IPAnalysis } from "@fosscord/api"; +import { route } from "@spacebar/api"; +import { getIpAdress, IPAnalysis } from "@spacebar/api"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts index 280d3461..fe0b4f99 100644 --- a/src/api/routes/auth/login.ts +++ b/src/api/routes/auth/login.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { getIpAdress, route, verifyCaptcha } from "@fosscord/api"; +import { getIpAdress, route, verifyCaptcha } from "@spacebar/api"; import { adjustEmail, Config, @@ -26,7 +26,7 @@ import { LoginSchema, User, WebAuthn, -} from "@fosscord/util"; +} from "@spacebar/util"; import bcrypt from "bcrypt"; import crypto from "crypto"; import { Request, Response, Router } from "express"; diff --git a/src/api/routes/auth/logout.ts b/src/api/routes/auth/logout.ts index 33ad144c..51909afa 100644 --- a/src/api/routes/auth/logout.ts +++ b/src/api/routes/auth/logout.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; const router: Router = Router(); diff --git a/src/api/routes/auth/mfa/totp.ts b/src/api/routes/auth/mfa/totp.ts index 83c4ba56..2396443d 100644 --- a/src/api/routes/auth/mfa/totp.ts +++ b/src/api/routes/auth/mfa/totp.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { BackupCode, generateToken, User, TotpSchema } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { BackupCode, generateToken, User, TotpSchema } from "@spacebar/util"; import { verifyToken } from "node-2fa"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/auth/mfa/webauthn.ts b/src/api/routes/auth/mfa/webauthn.ts index 8ffe1ee2..1b387411 100644 --- a/src/api/routes/auth/mfa/webauthn.ts +++ b/src/api/routes/auth/mfa/webauthn.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { generateToken, SecurityKey, @@ -24,7 +24,7 @@ import { verifyWebAuthnToken, WebAuthn, WebAuthnTotpSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; import { ExpectedAssertionResult } from "fido2-lib"; import { HTTPError } from "lambert-server"; diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts index aa09cf24..430c9532 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts @@ -26,14 +26,14 @@ import { adjustEmail, RegisterSchema, ValidRegistrationToken, -} from "@fosscord/util"; +} from "@spacebar/util"; import { route, getIpAdress, IPAnalysis, isProxy, verifyCaptcha, -} from "@fosscord/api"; +} from "@spacebar/api"; import bcrypt from "bcrypt"; import { HTTPError } from "lambert-server"; import { MoreThan } from "typeorm"; @@ -52,7 +52,7 @@ router.post( // They're a one time use token that bypasses registration limits ( rates, disabled reg, etc ) let regTokenUsed = false; if (req.get("Referrer") && req.get("Referrer")?.includes("token=")) { - // eg theyre on https://staging.fosscord.com/register?token=whatever + // eg theyre on https://staging.spacebar.chat/register?token=whatever const token = req.get("Referrer")?.split("token=")[1].split("&")[0]; if (token) { const regToken = await ValidRegistrationToken.findOneOrFail({ diff --git a/src/api/routes/auth/reset.ts b/src/api/routes/auth/reset.ts index a1fd218f..852a43c7 100644 --- a/src/api/routes/auth/reset.ts +++ b/src/api/routes/auth/reset.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { checkToken, Config, @@ -25,7 +25,7 @@ import { generateToken, PasswordResetSchema, User, -} from "@fosscord/util"; +} from "@spacebar/util"; import bcrypt from "bcrypt"; import { Request, Response, Router } from "express"; diff --git a/src/api/routes/auth/verify/index.ts b/src/api/routes/auth/verify/index.ts index 1cde3691..c1afcde9 100644 --- a/src/api/routes/auth/verify/index.ts +++ b/src/api/routes/auth/verify/index.ts @@ -16,14 +16,14 @@ along with this program. If not, see . */ -import { getIpAdress, route, verifyCaptcha } from "@fosscord/api"; +import { getIpAdress, route, verifyCaptcha } from "@spacebar/api"; import { checkToken, Config, FieldErrors, generateToken, User, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/auth/verify/resend.ts b/src/api/routes/auth/verify/resend.ts index d9751ee7..f2727abd 100644 --- a/src/api/routes/auth/verify/resend.ts +++ b/src/api/routes/auth/verify/resend.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; -import { Email, User } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { Email, User } from "@spacebar/util"; import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/auth/verify/view-backup-codes-challenge.ts b/src/api/routes/auth/verify/view-backup-codes-challenge.ts index e02e41f7..b12719ff 100644 --- a/src/api/routes/auth/verify/view-backup-codes-challenge.ts +++ b/src/api/routes/auth/verify/view-backup-codes-challenge.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { FieldErrors, User, BackupCodesChallengeSchema } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { FieldErrors, User, BackupCodesChallengeSchema } from "@spacebar/util"; import bcrypt from "bcrypt"; const router = Router(); diff --git a/src/api/routes/channels/#channel_id/index.ts b/src/api/routes/channels/#channel_id/index.ts index 2033e444..db0d4242 100644 --- a/src/api/routes/channels/#channel_id/index.ts +++ b/src/api/routes/channels/#channel_id/index.ts @@ -25,9 +25,9 @@ import { Recipient, handleFile, ChannelModifySchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); // TODO: delete channel diff --git a/src/api/routes/channels/#channel_id/invites.ts b/src/api/routes/channels/#channel_id/invites.ts index 9bb54026..9f247fe8 100644 --- a/src/api/routes/channels/#channel_id/invites.ts +++ b/src/api/routes/channels/#channel_id/invites.ts @@ -18,8 +18,8 @@ import { Router, Request, Response } from "express"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; -import { random } from "@fosscord/api"; +import { route } from "@spacebar/api"; +import { random } from "@spacebar/api"; import { Channel, Invite, @@ -28,7 +28,7 @@ import { User, Guild, PublicInviteRelation, -} from "@fosscord/util"; +} from "@spacebar/util"; import { isTextChannel } from "./messages"; const router: Router = Router(); diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts b/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts index 42c1c346..f098fa8e 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts @@ -21,9 +21,9 @@ import { getPermission, MessageAckEvent, ReadState, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts b/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts index d2ece163..909a459e 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts index 62e18be4..cd4b243e 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts @@ -20,7 +20,7 @@ import { Attachment, Channel, emitEvent, - FosscordApiErrors, + SpacebarApiErrors, getPermission, getRights, Message, @@ -31,11 +31,11 @@ import { uploadFile, MessageCreateSchema, MessageEditSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Response, Request } from "express"; import multer from "multer"; -import { route } from "@fosscord/api"; -import { handleMessage, postHandleMessage } from "@fosscord/api"; +import { route } from "@spacebar/api"; +import { handleMessage, postHandleMessage } from "@spacebar/api"; import { HTTPError } from "lambert-server"; const router = Router(); @@ -163,14 +163,14 @@ router.put( const snowflake = Snowflake.deconstruct(message_id); if (Date.now() < snowflake.timestamp) { // message is in the future - throw FosscordApiErrors.CANNOT_BACKFILL_TO_THE_FUTURE; + throw SpacebarApiErrors.CANNOT_BACKFILL_TO_THE_FUTURE; } const exists = await Message.findOne({ where: { id: message_id, channel_id: channel_id }, }); if (exists) { - throw FosscordApiErrors.CANNOT_REPLACE_BY_BACKFILL; + throw SpacebarApiErrors.CANNOT_REPLACE_BY_BACKFILL; } if (req.file) { diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts b/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts index 5f86c966..eafa70c8 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts @@ -30,8 +30,8 @@ import { PartialEmoji, PublicUserProjection, User, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Router, Response, Request } from "express"; import { HTTPError } from "lambert-server"; import { In } from "typeorm"; diff --git a/src/api/routes/channels/#channel_id/messages/bulk-delete.ts b/src/api/routes/channels/#channel_id/messages/bulk-delete.ts index d97b97e5..18476d5c 100644 --- a/src/api/routes/channels/#channel_id/messages/bulk-delete.ts +++ b/src/api/routes/channels/#channel_id/messages/bulk-delete.ts @@ -25,9 +25,9 @@ import { getRights, MessageDeleteBulkEvent, Message, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/channels/#channel_id/messages/index.ts b/src/api/routes/channels/#channel_id/messages/index.ts index b68bbcd4..c871087a 100644 --- a/src/api/routes/channels/#channel_id/messages/index.ts +++ b/src/api/routes/channels/#channel_id/messages/index.ts @@ -36,9 +36,9 @@ import { Rights, Reaction, User, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { handleMessage, postHandleMessage, route } from "@fosscord/api"; +import { handleMessage, postHandleMessage, route } from "@spacebar/api"; import multer from "multer"; import { FindManyOptions, FindOperator, LessThan, MoreThan } from "typeorm"; import { URL } from "url"; @@ -146,7 +146,7 @@ router.get("/", async (req: Request, res: Response) => { x.author = User.create({ id: "4", discriminator: "0000", - username: "Fosscord Ghost", + username: "Spacebar Ghost", public_flags: 0, }); x.attachments?.forEach((y: Attachment) => { diff --git a/src/api/routes/channels/#channel_id/permissions.ts b/src/api/routes/channels/#channel_id/permissions.ts index 1794cd9a..68dbc2f2 100644 --- a/src/api/routes/channels/#channel_id/permissions.ts +++ b/src/api/routes/channels/#channel_id/permissions.ts @@ -24,11 +24,11 @@ import { Member, Role, ChannelPermissionOverwriteSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Response, Request } from "express"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); // 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 bd4c6ae2..32820916 100644 --- a/src/api/routes/channels/#channel_id/pins.ts +++ b/src/api/routes/channels/#channel_id/pins.ts @@ -24,9 +24,9 @@ import { Message, MessageUpdateEvent, DiscordApiErrors, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/channels/#channel_id/purge.ts b/src/api/routes/channels/#channel_id/purge.ts index 5ff53129..c8da6760 100644 --- a/src/api/routes/channels/#channel_id/purge.ts +++ b/src/api/routes/channels/#channel_id/purge.ts @@ -17,7 +17,7 @@ */ import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { isTextChannel } from "./messages"; import { FindManyOptions, Between, Not, FindOperator } from "typeorm"; import { @@ -28,7 +28,7 @@ import { Message, MessageDeleteBulkEvent, PurgeSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Response, Request } from "express"; const router: Router = Router(); diff --git a/src/api/routes/channels/#channel_id/recipients.ts b/src/api/routes/channels/#channel_id/recipients.ts index 4cdc55ed..f1fb48af 100644 --- a/src/api/routes/channels/#channel_id/recipients.ts +++ b/src/api/routes/channels/#channel_id/recipients.ts @@ -27,8 +27,8 @@ import { PublicUserProjection, Recipient, User, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/channels/#channel_id/typing.ts b/src/api/routes/channels/#channel_id/typing.ts index e697ac96..6a2fef39 100644 --- a/src/api/routes/channels/#channel_id/typing.ts +++ b/src/api/routes/channels/#channel_id/typing.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { Channel, emitEvent, Member, TypingStartEvent } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { Channel, emitEvent, Member, TypingStartEvent } from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Router, Request, Response } from "express"; const router: Router = Router(); diff --git a/src/api/routes/channels/#channel_id/webhooks.ts b/src/api/routes/channels/#channel_id/webhooks.ts index d5dd2522..14791a1c 100644 --- a/src/api/routes/channels/#channel_id/webhooks.ts +++ b/src/api/routes/channels/#channel_id/webhooks.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Channel, Config, @@ -27,10 +27,10 @@ import { Webhook, WebhookCreateSchema, WebhookType, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; import { isTextChannel } from "./messages/index"; -import { DiscordApiErrors } from "@fosscord/util"; +import { DiscordApiErrors } from "@spacebar/util"; import crypto from "crypto"; const router: Router = Router(); @@ -63,7 +63,7 @@ router.post( // TODO: move this if (name === "clyde") throw new HTTPError("Invalid name", 400); - if (name === "Fosscord Ghost") throw new HTTPError("Invalid name", 400); + if (name === "Spacebar Ghost") throw new HTTPError("Invalid name", 400); if (avatar) avatar = await handleFile(`/avatars/${channel_id}`, avatar); diff --git a/src/api/routes/discoverable-guilds.ts b/src/api/routes/discoverable-guilds.ts index 383fa298..75eb6088 100644 --- a/src/api/routes/discoverable-guilds.ts +++ b/src/api/routes/discoverable-guilds.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { Guild, Config } from "@fosscord/util"; +import { Guild, Config } from "@spacebar/util"; import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Like } from "typeorm"; const router = Router(); diff --git a/src/api/routes/discovery.ts b/src/api/routes/discovery.ts index f9f620fb..0c8089e4 100644 --- a/src/api/routes/discovery.ts +++ b/src/api/routes/discovery.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Categories } from "@fosscord/util"; +import { Categories } from "@spacebar/util"; import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/download.ts b/src/api/routes/download.ts index 916e9208..c4eea8e8 100644 --- a/src/api/routes/download.ts +++ b/src/api/routes/download.ts @@ -17,8 +17,8 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { FieldErrors, Release } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { FieldErrors, Release } from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/experiments.ts b/src/api/routes/experiments.ts index a29dd894..cd206d79 100644 --- a/src/api/routes/experiments.ts +++ b/src/api/routes/experiments.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/gateway/bot.ts b/src/api/routes/gateway/bot.ts index 1cce93b0..243159ec 100644 --- a/src/api/routes/gateway/bot.ts +++ b/src/api/routes/gateway/bot.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import { Router, Response, Request } from "express"; -import { route, RouteOptions } from "@fosscord/api"; +import { route, RouteOptions } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/gateway/index.ts b/src/api/routes/gateway/index.ts index ee500e9b..12e96919 100644 --- a/src/api/routes/gateway/index.ts +++ b/src/api/routes/gateway/index.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import { Router, Response, Request } from "express"; -import { route, RouteOptions } from "@fosscord/api"; +import { route, RouteOptions } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/gifs/search.ts b/src/api/routes/gifs/search.ts index d3e8ef1c..fb99374b 100644 --- a/src/api/routes/gifs/search.ts +++ b/src/api/routes/gifs/search.ts @@ -19,7 +19,7 @@ import { Router, Response, Request } from "express"; import fetch from "node-fetch"; import ProxyAgent from "proxy-agent"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { getGifApiKey, parseGifResult } from "./trending"; const router = Router(); diff --git a/src/api/routes/gifs/trending-gifs.ts b/src/api/routes/gifs/trending-gifs.ts index a05bc9aa..238a2abd 100644 --- a/src/api/routes/gifs/trending-gifs.ts +++ b/src/api/routes/gifs/trending-gifs.ts @@ -19,7 +19,7 @@ import { Router, Response, Request } from "express"; import fetch from "node-fetch"; import ProxyAgent from "proxy-agent"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { getGifApiKey, parseGifResult } from "./trending"; const router = Router(); diff --git a/src/api/routes/gifs/trending.ts b/src/api/routes/gifs/trending.ts index e7b5f218..5cccdb2d 100644 --- a/src/api/routes/gifs/trending.ts +++ b/src/api/routes/gifs/trending.ts @@ -19,8 +19,8 @@ import { Router, Response, Request } from "express"; import fetch from "node-fetch"; import ProxyAgent from "proxy-agent"; -import { route } from "@fosscord/api"; -import { Config } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { Config } from "@spacebar/util"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/guild-recommendations.ts b/src/api/routes/guild-recommendations.ts index c6087386..67f43c14 100644 --- a/src/api/routes/guild-recommendations.ts +++ b/src/api/routes/guild-recommendations.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { Guild, Config } from "@fosscord/util"; +import { Guild, Config } from "@spacebar/util"; import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Like } from "typeorm"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/audit-logs.ts b/src/api/routes/guilds/#guild_id/audit-logs.ts index 82c4f254..5dbb0e3f 100644 --- a/src/api/routes/guilds/#guild_id/audit-logs.ts +++ b/src/api/routes/guilds/#guild_id/audit-logs.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); //TODO: implement audit logs diff --git a/src/api/routes/guilds/#guild_id/bans.ts b/src/api/routes/guilds/#guild_id/bans.ts index 3ecb31c3..31aed6b9 100644 --- a/src/api/routes/guilds/#guild_id/bans.ts +++ b/src/api/routes/guilds/#guild_id/bans.ts @@ -27,9 +27,9 @@ import { Member, BanRegistrySchema, BanModeratorSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { getIpAdress, route } from "@fosscord/api"; +import { getIpAdress, route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/guilds/#guild_id/channels.ts b/src/api/routes/guilds/#guild_id/channels.ts index 0f6225d7..d74d9f84 100644 --- a/src/api/routes/guilds/#guild_id/channels.ts +++ b/src/api/routes/guilds/#guild_id/channels.ts @@ -23,9 +23,9 @@ import { emitEvent, ChannelModifySchema, ChannelReorderSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/guilds/#guild_id/delete.ts b/src/api/routes/guilds/#guild_id/delete.ts index 184e1798..ec72a4ae 100644 --- a/src/api/routes/guilds/#guild_id/delete.ts +++ b/src/api/routes/guilds/#guild_id/delete.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { emitEvent, GuildDeleteEvent, Guild } from "@fosscord/util"; +import { emitEvent, GuildDeleteEvent, Guild } from "@spacebar/util"; import { Router, Request, Response } from "express"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/discovery-requirements.ts b/src/api/routes/guilds/#guild_id/discovery-requirements.ts index badde878..5e15676a 100644 --- a/src/api/routes/guilds/#guild_id/discovery-requirements.ts +++ b/src/api/routes/guilds/#guild_id/discovery-requirements.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/emojis.ts b/src/api/routes/guilds/#guild_id/emojis.ts index 85fcabc1..c661202e 100644 --- a/src/api/routes/guilds/#guild_id/emojis.ts +++ b/src/api/routes/guilds/#guild_id/emojis.ts @@ -29,8 +29,8 @@ import { User, EmojiCreateSchema, EmojiModifySchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts index 49493342..672bc92e 100644 --- a/src/api/routes/guilds/#guild_id/index.ts +++ b/src/api/routes/guilds/#guild_id/index.ts @@ -27,10 +27,10 @@ import { handleFile, Member, GuildUpdateSchema, - FosscordApiErrors, -} from "@fosscord/util"; + SpacebarApiErrors, +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); @@ -113,7 +113,7 @@ router.patch( for (const feature of diff) { if (MUTABLE_FEATURES.includes(feature)) continue; - throw FosscordApiErrors.FEATURE_IS_IMMUTABLE.withParams( + throw SpacebarApiErrors.FEATURE_IS_IMMUTABLE.withParams( feature, ); } diff --git a/src/api/routes/guilds/#guild_id/integrations.ts b/src/api/routes/guilds/#guild_id/integrations.ts index d5318328..3d963af1 100644 --- a/src/api/routes/guilds/#guild_id/integrations.ts +++ b/src/api/routes/guilds/#guild_id/integrations.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); //TODO: implement integrations list diff --git a/src/api/routes/guilds/#guild_id/invites.ts b/src/api/routes/guilds/#guild_id/invites.ts index 04a89af7..9c446928 100644 --- a/src/api/routes/guilds/#guild_id/invites.ts +++ b/src/api/routes/guilds/#guild_id/invites.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { Invite, PublicInviteRelation } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { Invite, PublicInviteRelation } from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/member-verification.ts b/src/api/routes/guilds/#guild_id/member-verification.ts index 7bb46cbc..242f3684 100644 --- a/src/api/routes/guilds/#guild_id/member-verification.ts +++ b/src/api/routes/guilds/#guild_id/member-verification.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/guilds/#guild_id/members/#member_id/index.ts b/src/api/routes/guilds/#guild_id/members/#member_id/index.ts index e76c9607..a14691f2 100644 --- a/src/api/routes/guilds/#guild_id/members/#member_id/index.ts +++ b/src/api/routes/guilds/#guild_id/members/#member_id/index.ts @@ -29,8 +29,8 @@ import { Guild, handleFile, MemberChangeSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/members/#member_id/nick.ts b/src/api/routes/guilds/#guild_id/members/#member_id/nick.ts index ac40f0db..14e7467f 100644 --- a/src/api/routes/guilds/#guild_id/members/#member_id/nick.ts +++ b/src/api/routes/guilds/#guild_id/members/#member_id/nick.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { getPermission, Member, PermissionResolvable } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { getPermission, Member, PermissionResolvable } from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/members/#member_id/roles/#role_id/index.ts b/src/api/routes/guilds/#guild_id/members/#member_id/roles/#role_id/index.ts index 071883d6..698df88f 100644 --- a/src/api/routes/guilds/#guild_id/members/#member_id/roles/#role_id/index.ts +++ b/src/api/routes/guilds/#guild_id/members/#member_id/roles/#role_id/index.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { Member } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { Member } from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/members/index.ts b/src/api/routes/guilds/#guild_id/members/index.ts index 87c2af20..f7a55cf1 100644 --- a/src/api/routes/guilds/#guild_id/members/index.ts +++ b/src/api/routes/guilds/#guild_id/members/index.ts @@ -17,8 +17,8 @@ */ import { Request, Response, Router } from "express"; -import { Member, PublicMemberProjection } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { Member, PublicMemberProjection } from "@spacebar/util"; +import { route } from "@spacebar/api"; import { MoreThan } from "typeorm"; import { HTTPError } from "lambert-server"; diff --git a/src/api/routes/guilds/#guild_id/messages/search.ts b/src/api/routes/guilds/#guild_id/messages/search.ts index b4869bc0..bc5f1b6e 100644 --- a/src/api/routes/guilds/#guild_id/messages/search.ts +++ b/src/api/routes/guilds/#guild_id/messages/search.ts @@ -19,8 +19,8 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; -import { getPermission, FieldErrors, Message, Channel } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { getPermission, FieldErrors, Message, Channel } from "@spacebar/util"; import { HTTPError } from "lambert-server"; import { FindManyOptions, In, Like } from "typeorm"; diff --git a/src/api/routes/guilds/#guild_id/premium.ts b/src/api/routes/guilds/#guild_id/premium.ts index 1a3a8497..7b343daf 100644 --- a/src/api/routes/guilds/#guild_id/premium.ts +++ b/src/api/routes/guilds/#guild_id/premium.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get("/subscriptions", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/guilds/#guild_id/profile/index.ts b/src/api/routes/guilds/#guild_id/profile/index.ts index 1511fab4..8ec22ea4 100644 --- a/src/api/routes/guilds/#guild_id/profile/index.ts +++ b/src/api/routes/guilds/#guild_id/profile/index.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { emitEvent, GuildMemberUpdateEvent, @@ -24,7 +24,7 @@ import { Member, MemberChangeProfileSchema, OrmUtils, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/prune.ts b/src/api/routes/guilds/#guild_id/prune.ts index e29ef641..dbed546b 100644 --- a/src/api/routes/guilds/#guild_id/prune.ts +++ b/src/api/routes/guilds/#guild_id/prune.ts @@ -17,9 +17,9 @@ */ import { Router, Request, Response } from "express"; -import { Guild, Member, Snowflake } from "@fosscord/util"; +import { Guild, Member, Snowflake } from "@spacebar/util"; import { LessThan, IsNull } from "typeorm"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); //Returns all inactive members, respecting role hierarchy diff --git a/src/api/routes/guilds/#guild_id/regions.ts b/src/api/routes/guilds/#guild_id/regions.ts index 83dc9144..de1e8769 100644 --- a/src/api/routes/guilds/#guild_id/regions.ts +++ b/src/api/routes/guilds/#guild_id/regions.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Guild } from "@fosscord/util"; +import { Guild } from "@spacebar/util"; import { Request, Response, Router } from "express"; -import { getVoiceRegions, route, getIpAdress } from "@fosscord/api"; +import { getVoiceRegions, route, getIpAdress } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/roles/#role_id/index.ts b/src/api/routes/guilds/#guild_id/roles/#role_id/index.ts index f783e27b..de3fc35b 100644 --- a/src/api/routes/guilds/#guild_id/roles/#role_id/index.ts +++ b/src/api/routes/guilds/#guild_id/roles/#role_id/index.ts @@ -25,8 +25,8 @@ import { emitEvent, handleFile, RoleModifySchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/roles/index.ts b/src/api/routes/guilds/#guild_id/roles/index.ts index 6f3fab48..f93e9385 100644 --- a/src/api/routes/guilds/#guild_id/roles/index.ts +++ b/src/api/routes/guilds/#guild_id/roles/index.ts @@ -29,8 +29,8 @@ import { RoleModifySchema, RolePositionUpdateSchema, Snowflake, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Not } from "typeorm"; const router: Router = Router(); diff --git a/src/api/routes/guilds/#guild_id/stickers.ts b/src/api/routes/guilds/#guild_id/stickers.ts index 3d0c494e..84a23670 100644 --- a/src/api/routes/guilds/#guild_id/stickers.ts +++ b/src/api/routes/guilds/#guild_id/stickers.ts @@ -26,9 +26,9 @@ import { StickerType, uploadFile, ModifyGuildStickerSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import multer from "multer"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/templates.ts b/src/api/routes/guilds/#guild_id/templates.ts index 8a8c53fe..3bd28e05 100644 --- a/src/api/routes/guilds/#guild_id/templates.ts +++ b/src/api/routes/guilds/#guild_id/templates.ts @@ -17,10 +17,10 @@ */ import { Request, Response, Router } from "express"; -import { Guild, Template } from "@fosscord/util"; +import { Guild, Template } from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; -import { generateCode } from "@fosscord/api"; +import { route } from "@spacebar/api"; +import { generateCode } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/guilds/#guild_id/vanity-url.ts b/src/api/routes/guilds/#guild_id/vanity-url.ts index e97c92c5..c85c943f 100644 --- a/src/api/routes/guilds/#guild_id/vanity-url.ts +++ b/src/api/routes/guilds/#guild_id/vanity-url.ts @@ -22,9 +22,9 @@ import { Guild, Invite, VanityUrlSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { HTTPError } from "lambert-server"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts b/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts index 784d7746..791ac102 100644 --- a/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts +++ b/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts @@ -25,8 +25,8 @@ import { VoiceState, VoiceStateUpdateEvent, VoiceStateUpdateSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/guilds/#guild_id/webhooks.ts b/src/api/routes/guilds/#guild_id/webhooks.ts index caa252d2..d58659a4 100644 --- a/src/api/routes/guilds/#guild_id/webhooks.ts +++ b/src/api/routes/guilds/#guild_id/webhooks.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); //TODO: implement webhooks diff --git a/src/api/routes/guilds/#guild_id/welcome-screen.ts b/src/api/routes/guilds/#guild_id/welcome-screen.ts index 938eef09..696e20db 100644 --- a/src/api/routes/guilds/#guild_id/welcome-screen.ts +++ b/src/api/routes/guilds/#guild_id/welcome-screen.ts @@ -17,9 +17,9 @@ */ import { Request, Response, Router } from "express"; -import { Guild, Member, GuildUpdateWelcomeScreenSchema } from "@fosscord/util"; +import { Guild, Member, GuildUpdateWelcomeScreenSchema } from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/guilds/#guild_id/widget.json.ts b/src/api/routes/guilds/#guild_id/widget.json.ts index 57186e80..1799f0be 100644 --- a/src/api/routes/guilds/#guild_id/widget.json.ts +++ b/src/api/routes/guilds/#guild_id/widget.json.ts @@ -17,9 +17,9 @@ */ import { Request, Response, Router } from "express"; -import { Permissions, Guild, Invite, Channel, Member } from "@fosscord/util"; +import { Permissions, Guild, Invite, Channel, Member } from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { random, route } from "@fosscord/api"; +import { random, route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/guilds/#guild_id/widget.png.ts b/src/api/routes/guilds/#guild_id/widget.png.ts index e4a7713c..4e975603 100644 --- a/src/api/routes/guilds/#guild_id/widget.png.ts +++ b/src/api/routes/guilds/#guild_id/widget.png.ts @@ -19,9 +19,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Request, Response, Router } from "express"; -import { Guild } from "@fosscord/util"; +import { Guild } from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import fs from "fs"; import path from "path"; @@ -58,7 +58,7 @@ router.get("/", route({}), async (req: Request, res: Response) => { const { loadImage } = require("canvas"); const sizeOf = require("image-size"); - // TODO: Widget style templates need Fosscord branding + // TODO: Widget style templates need Spacebar branding const source = path.join( __dirname, "..", diff --git a/src/api/routes/guilds/#guild_id/widget.ts b/src/api/routes/guilds/#guild_id/widget.ts index c8b47c4f..77af25dc 100644 --- a/src/api/routes/guilds/#guild_id/widget.ts +++ b/src/api/routes/guilds/#guild_id/widget.ts @@ -17,8 +17,8 @@ */ import { Request, Response, Router } from "express"; -import { Guild, WidgetModifySchema } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { Guild, WidgetModifySchema } from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/guilds/index.ts b/src/api/routes/guilds/index.ts index 6b95bd97..c793d185 100644 --- a/src/api/routes/guilds/index.ts +++ b/src/api/routes/guilds/index.ts @@ -24,8 +24,8 @@ import { Member, DiscordApiErrors, GuildCreateSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/guilds/templates/index.ts b/src/api/routes/guilds/templates/index.ts index df753a2c..bfbb7d3b 100644 --- a/src/api/routes/guilds/templates/index.ts +++ b/src/api/routes/guilds/templates/index.ts @@ -25,9 +25,9 @@ import { Config, Member, GuildTemplateCreateSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; -import { DiscordApiErrors } from "@fosscord/util"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; +import { DiscordApiErrors } from "@spacebar/util"; import fetch from "node-fetch"; const router: Router = Router(); diff --git a/src/api/routes/invites/index.ts b/src/api/routes/invites/index.ts index 805e5e6e..6680e375 100644 --- a/src/api/routes/invites/index.ts +++ b/src/api/routes/invites/index.ts @@ -25,8 +25,8 @@ import { InviteDeleteEvent, User, PublicInviteRelation, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import { HTTPError } from "lambert-server"; const router: Router = Router(); diff --git a/src/api/routes/oauth2/authorize.ts b/src/api/routes/oauth2/authorize.ts index b06be724..c041f671 100644 --- a/src/api/routes/oauth2/authorize.ts +++ b/src/api/routes/oauth2/authorize.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { ApiError, Application, @@ -27,7 +27,7 @@ import { Member, Permissions, User, -} from "@fosscord/util"; +} from "@spacebar/util"; const router = Router(); // TODO: scopes, other oauth types diff --git a/src/api/routes/oauth2/tokens.ts b/src/api/routes/oauth2/tokens.ts index cff33137..86290721 100644 --- a/src/api/routes/oauth2/tokens.ts +++ b/src/api/routes/oauth2/tokens.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/outbound-promotions.ts b/src/api/routes/outbound-promotions.ts index a260bb4c..1d4564da 100644 --- a/src/api/routes/outbound-promotions.ts +++ b/src/api/routes/outbound-promotions.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/partners/#guild_id/requirements.ts b/src/api/routes/partners/#guild_id/requirements.ts index badde878..5e15676a 100644 --- a/src/api/routes/partners/#guild_id/requirements.ts +++ b/src/api/routes/partners/#guild_id/requirements.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/ping.ts b/src/api/routes/ping.ts index 8deefd32..0fb6d9d0 100644 --- a/src/api/routes/ping.ts +++ b/src/api/routes/ping.ts @@ -17,8 +17,8 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { Config } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { Config } from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/policies/instance/domains.ts b/src/api/routes/policies/instance/domains.ts index d97f8711..fe032b50 100644 --- a/src/api/routes/policies/instance/domains.ts +++ b/src/api/routes/policies/instance/domains.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { Config } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { Config } from "@spacebar/util"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/policies/instance/index.ts b/src/api/routes/policies/instance/index.ts index 163c9c23..68ce3b42 100644 --- a/src/api/routes/policies/instance/index.ts +++ b/src/api/routes/policies/instance/index.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { Config } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { Config } from "@spacebar/util"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/policies/instance/limits.ts b/src/api/routes/policies/instance/limits.ts index 732d8a48..a6f13170 100644 --- a/src/api/routes/policies/instance/limits.ts +++ b/src/api/routes/policies/instance/limits.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { Config } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { Config } from "@spacebar/util"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/policies/stats.ts b/src/api/routes/policies/stats.ts index 764a5790..3939e1e8 100644 --- a/src/api/routes/policies/stats.ts +++ b/src/api/routes/policies/stats.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { Config, getRights, @@ -24,7 +24,7 @@ import { Member, Message, User, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/read-states/ack-bulk.ts b/src/api/routes/read-states/ack-bulk.ts index cab16c8c..2c51893b 100644 --- a/src/api/routes/read-states/ack-bulk.ts +++ b/src/api/routes/read-states/ack-bulk.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; -import { AckBulkSchema, ReadState } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { AckBulkSchema, ReadState } from "@spacebar/util"; const router = Router(); router.post( diff --git a/src/api/routes/scheduled-maintenances/upcoming_json.ts b/src/api/routes/scheduled-maintenances/upcoming_json.ts index b85d85fa..c1fc0ff3 100644 --- a/src/api/routes/scheduled-maintenances/upcoming_json.ts +++ b/src/api/routes/scheduled-maintenances/upcoming_json.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get( diff --git a/src/api/routes/science.ts b/src/api/routes/science.ts index 52c6d903..099da18b 100644 --- a/src/api/routes/science.ts +++ b/src/api/routes/science.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/stage-instances.ts b/src/api/routes/stage-instances.ts index a260bb4c..1d4564da 100644 --- a/src/api/routes/stage-instances.ts +++ b/src/api/routes/stage-instances.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/sticker-packs/index.ts b/src/api/routes/sticker-packs/index.ts index d5c6cb11..234e03c6 100644 --- a/src/api/routes/sticker-packs/index.ts +++ b/src/api/routes/sticker-packs/index.ts @@ -17,8 +17,8 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; -import { StickerPack } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { StickerPack } from "@spacebar/util"; const router: Router = Router(); diff --git a/src/api/routes/stickers/#sticker_id/index.ts b/src/api/routes/stickers/#sticker_id/index.ts index 0c986320..360149b5 100644 --- a/src/api/routes/stickers/#sticker_id/index.ts +++ b/src/api/routes/stickers/#sticker_id/index.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Sticker } from "@fosscord/util"; +import { Sticker } from "@spacebar/util"; import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/stop.ts b/src/api/routes/stop.ts index a1761e67..6a6e6277 100644 --- a/src/api/routes/stop.ts +++ b/src/api/routes/stop.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/store/published-listings/applications.ts b/src/api/routes/store/published-listings/applications.ts index 483429e5..5ee63e53 100644 --- a/src/api/routes/store/published-listings/applications.ts +++ b/src/api/routes/store/published-listings/applications.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/store/published-listings/applications/#id/subscription-plans.ts b/src/api/routes/store/published-listings/applications/#id/subscription-plans.ts index 5bc36b7a..a15e0bf7 100644 --- a/src/api/routes/store/published-listings/applications/#id/subscription-plans.ts +++ b/src/api/routes/store/published-listings/applications/#id/subscription-plans.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/store/published-listings/skus.ts b/src/api/routes/store/published-listings/skus.ts index 483429e5..5ee63e53 100644 --- a/src/api/routes/store/published-listings/skus.ts +++ b/src/api/routes/store/published-listings/skus.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/store/published-listings/skus/#sku_id/subscription-plans.ts b/src/api/routes/store/published-listings/skus/#sku_id/subscription-plans.ts index 4d9f7cac..4ea35c18 100644 --- a/src/api/routes/store/published-listings/skus/#sku_id/subscription-plans.ts +++ b/src/api/routes/store/published-listings/skus/#sku_id/subscription-plans.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/teams.ts b/src/api/routes/teams.ts index bca5b915..26570165 100644 --- a/src/api/routes/teams.ts +++ b/src/api/routes/teams.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/template.ts.disabled b/src/api/routes/template.ts.disabled index fcc59ef4..c9d78a03 100644 --- a/src/api/routes/template.ts.disabled +++ b/src/api/routes/template.ts.disabled @@ -1,7 +1,7 @@ //TODO: this is a template for a generic route import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); router.get("/",route({}), async (req: Request, res: Response) => { diff --git a/src/api/routes/track.ts b/src/api/routes/track.ts index 52c6d903..099da18b 100644 --- a/src/api/routes/track.ts +++ b/src/api/routes/track.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/updates.ts b/src/api/routes/updates.ts index 2458871f..f7403899 100644 --- a/src/api/routes/updates.ts +++ b/src/api/routes/updates.ts @@ -17,8 +17,8 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { FieldErrors, Release } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { FieldErrors, Release } from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/users/#id/delete.ts b/src/api/routes/users/#id/delete.ts index df9d1d6a..e36a35e6 100644 --- a/src/api/routes/users/#id/delete.ts +++ b/src/api/routes/users/#id/delete.ts @@ -16,14 +16,14 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { emitEvent, Member, PrivateUserProjection, User, UserDeleteEvent, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/users/#id/index.ts b/src/api/routes/users/#id/index.ts index 9d418bfd..0c7cfe37 100644 --- a/src/api/routes/users/#id/index.ts +++ b/src/api/routes/users/#id/index.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { User } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { User } from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/#id/profile.ts b/src/api/routes/users/#id/profile.ts index 78e704ba..4727e215 100644 --- a/src/api/routes/users/#id/profile.ts +++ b/src/api/routes/users/#id/profile.ts @@ -25,8 +25,8 @@ import { PrivateUserProjection, emitEvent, UserUpdateEvent, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/#id/relationships.ts b/src/api/routes/users/#id/relationships.ts index 241b097d..dfe52a5e 100644 --- a/src/api/routes/users/#id/relationships.ts +++ b/src/api/routes/users/#id/relationships.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { User } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { User } from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/activities/statistics/applications.ts b/src/api/routes/users/@me/activities/statistics/applications.ts index 222261bf..5e797ce8 100644 --- a/src/api/routes/users/@me/activities/statistics/applications.ts +++ b/src/api/routes/users/@me/activities/statistics/applications.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/affinities/guilds.ts b/src/api/routes/users/@me/affinities/guilds.ts index 752ab159..e4966148 100644 --- a/src/api/routes/users/@me/affinities/guilds.ts +++ b/src/api/routes/users/@me/affinities/guilds.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/affinities/users.ts b/src/api/routes/users/@me/affinities/users.ts index dfd84774..76fb8aa6 100644 --- a/src/api/routes/users/@me/affinities/users.ts +++ b/src/api/routes/users/@me/affinities/users.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/applications/#app_id/entitlements.ts b/src/api/routes/users/@me/applications/#app_id/entitlements.ts index a260bb4c..1d4564da 100644 --- a/src/api/routes/users/@me/applications/#app_id/entitlements.ts +++ b/src/api/routes/users/@me/applications/#app_id/entitlements.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/billing/country-code.ts b/src/api/routes/users/@me/billing/country-code.ts index ed6c19b9..2a43a396 100644 --- a/src/api/routes/users/@me/billing/country-code.ts +++ b/src/api/routes/users/@me/billing/country-code.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/billing/payment-sources.ts b/src/api/routes/users/@me/billing/payment-sources.ts index 222261bf..5e797ce8 100644 --- a/src/api/routes/users/@me/billing/payment-sources.ts +++ b/src/api/routes/users/@me/billing/payment-sources.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/billing/subscriptions.ts b/src/api/routes/users/@me/billing/subscriptions.ts index a260bb4c..1d4564da 100644 --- a/src/api/routes/users/@me/billing/subscriptions.ts +++ b/src/api/routes/users/@me/billing/subscriptions.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/channels.ts b/src/api/routes/users/@me/channels.ts index 3c94826f..04db4fe9 100644 --- a/src/api/routes/users/@me/channels.ts +++ b/src/api/routes/users/@me/channels.ts @@ -22,8 +22,8 @@ import { DmChannelDTO, Channel, DmChannelCreateSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/connections.ts b/src/api/routes/users/@me/connections.ts index a260bb4c..1d4564da 100644 --- a/src/api/routes/users/@me/connections.ts +++ b/src/api/routes/users/@me/connections.ts @@ -17,7 +17,7 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/delete.ts b/src/api/routes/users/@me/delete.ts index e73a7f45..dce737fc 100644 --- a/src/api/routes/users/@me/delete.ts +++ b/src/api/routes/users/@me/delete.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { Member, User } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { Member, User } from "@spacebar/util"; +import { route } from "@spacebar/api"; import bcrypt from "bcrypt"; import { HTTPError } from "lambert-server"; diff --git a/src/api/routes/users/@me/devices.ts b/src/api/routes/users/@me/devices.ts index 52c6d903..099da18b 100644 --- a/src/api/routes/users/@me/devices.ts +++ b/src/api/routes/users/@me/devices.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/disable.ts b/src/api/routes/users/@me/disable.ts index 15e5d9e1..d123a6a1 100644 --- a/src/api/routes/users/@me/disable.ts +++ b/src/api/routes/users/@me/disable.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { User } from "@fosscord/util"; +import { User } from "@spacebar/util"; import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import bcrypt from "bcrypt"; const router = Router(); diff --git a/src/api/routes/users/@me/email-settings.ts b/src/api/routes/users/@me/email-settings.ts index 8d4e7873..4c9e16b1 100644 --- a/src/api/routes/users/@me/email-settings.ts +++ b/src/api/routes/users/@me/email-settings.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/entitlements.ts b/src/api/routes/users/@me/entitlements.ts index ff088314..7f552622 100644 --- a/src/api/routes/users/@me/entitlements.ts +++ b/src/api/routes/users/@me/entitlements.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/guilds.ts b/src/api/routes/users/@me/guilds.ts index 0de574fc..b16b909d 100644 --- a/src/api/routes/users/@me/guilds.ts +++ b/src/api/routes/users/@me/guilds.ts @@ -25,9 +25,9 @@ import { GuildMemberRemoveEvent, emitEvent, Config, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/guilds/#guild_id/settings.ts b/src/api/routes/users/@me/guilds/#guild_id/settings.ts index 9cdc90e6..7e9f2a08 100644 --- a/src/api/routes/users/@me/guilds/#guild_id/settings.ts +++ b/src/api/routes/users/@me/guilds/#guild_id/settings.ts @@ -22,8 +22,8 @@ import { Member, OrmUtils, UserGuildSettingsSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/guilds/premium/subscription-slots.ts b/src/api/routes/users/@me/guilds/premium/subscription-slots.ts index 222261bf..5e797ce8 100644 --- a/src/api/routes/users/@me/guilds/premium/subscription-slots.ts +++ b/src/api/routes/users/@me/guilds/premium/subscription-slots.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts index 79bb85f8..b3eeb964 100644 --- a/src/api/routes/users/@me/index.ts +++ b/src/api/routes/users/@me/index.ts @@ -28,8 +28,8 @@ import { Config, UserModifySchema, generateToken, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import bcrypt from "bcrypt"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/library.ts b/src/api/routes/users/@me/library.ts index eacbd039..54d9b04f 100644 --- a/src/api/routes/users/@me/library.ts +++ b/src/api/routes/users/@me/library.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/mfa/codes-verification.ts b/src/api/routes/users/@me/mfa/codes-verification.ts index e202dc56..69d45e91 100644 --- a/src/api/routes/users/@me/mfa/codes-verification.ts +++ b/src/api/routes/users/@me/mfa/codes-verification.ts @@ -17,14 +17,14 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { BackupCode, generateMfaBackupCodes, User, CodesVerificationSchema, DiscordApiErrors, -} from "@fosscord/util"; +} from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/users/@me/mfa/codes.ts b/src/api/routes/users/@me/mfa/codes.ts index c9f73ce6..4ddbf78e 100644 --- a/src/api/routes/users/@me/mfa/codes.ts +++ b/src/api/routes/users/@me/mfa/codes.ts @@ -17,14 +17,14 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { BackupCode, FieldErrors, generateMfaBackupCodes, User, MfaCodesSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import bcrypt from "bcrypt"; const router = Router(); diff --git a/src/api/routes/users/@me/mfa/totp/disable.ts b/src/api/routes/users/@me/mfa/totp/disable.ts index f2a63aab..9f406423 100644 --- a/src/api/routes/users/@me/mfa/totp/disable.ts +++ b/src/api/routes/users/@me/mfa/totp/disable.ts @@ -17,7 +17,7 @@ */ import { Router, Request, Response } from "express"; -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { verifyToken } from "node-2fa"; import { HTTPError } from "lambert-server"; import { @@ -25,7 +25,7 @@ import { generateToken, BackupCode, TotpDisableSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; const router = Router(); diff --git a/src/api/routes/users/@me/mfa/totp/enable.ts b/src/api/routes/users/@me/mfa/totp/enable.ts index 9baf7657..4d6b2763 100644 --- a/src/api/routes/users/@me/mfa/totp/enable.ts +++ b/src/api/routes/users/@me/mfa/totp/enable.ts @@ -22,8 +22,8 @@ import { generateToken, generateMfaBackupCodes, TotpEnableSchema, -} from "@fosscord/util"; -import { route } from "@fosscord/api"; +} from "@spacebar/util"; +import { route } from "@spacebar/api"; import bcrypt from "bcrypt"; import { HTTPError } from "lambert-server"; import { verifyToken } from "node-2fa"; diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts index 54c3d9c7..04aca7e4 100644 --- a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts +++ b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; -import { SecurityKey, User } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { SecurityKey, User } from "@spacebar/util"; import { Request, Response, Router } from "express"; const router = Router(); diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts index 8cc60d58..29dbb7cf 100644 --- a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts +++ b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { route } from "@fosscord/api"; +import { route } from "@spacebar/api"; import { CreateWebAuthnCredentialSchema, DiscordApiErrors, @@ -28,7 +28,7 @@ import { verifyWebAuthnToken, WebAuthn, WebAuthnPostSchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import bcrypt from "bcrypt"; import { Request, Response, Router } from "express"; import { ExpectedAttestationResult } from "fido2-lib"; diff --git a/src/api/routes/users/@me/notes.ts b/src/api/routes/users/@me/notes.ts index 87d45277..d05c799c 100644 --- a/src/api/routes/users/@me/notes.ts +++ b/src/api/routes/users/@me/notes.ts @@ -17,8 +17,8 @@ */ import { Request, Response, Router } from "express"; -import { route } from "@fosscord/api"; -import { User, Note, emitEvent, Snowflake } from "@fosscord/util"; +import { route } from "@spacebar/api"; +import { User, Note, emitEvent, Snowflake } from "@spacebar/util"; const router: Router = Router(); diff --git a/src/api/routes/users/@me/relationships.ts b/src/api/routes/users/@me/relationships.ts index 268e5660..e9ea47e6 100644 --- a/src/api/routes/users/@me/relationships.ts +++ b/src/api/routes/users/@me/relationships.ts @@ -25,11 +25,11 @@ import { emitEvent, Relationship, Config, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Router, Response, Request } from "express"; import { HTTPError } from "lambert-server"; -import { DiscordApiErrors } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { DiscordApiErrors } from "@spacebar/util"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/users/@me/settings.ts b/src/api/routes/users/@me/settings.ts index e91597e4..62cfe904 100644 --- a/src/api/routes/users/@me/settings.ts +++ b/src/api/routes/users/@me/settings.ts @@ -17,8 +17,8 @@ */ import { Router, Response, Request } from "express"; -import { User, UserSettingsSchema } from "@fosscord/util"; -import { route } from "@fosscord/api"; +import { User, UserSettingsSchema } from "@spacebar/util"; +import { route } from "@spacebar/api"; const router = Router(); diff --git a/src/api/routes/voice/regions.ts b/src/api/routes/voice/regions.ts index 8ff52bca..59bac07f 100644 --- a/src/api/routes/voice/regions.ts +++ b/src/api/routes/voice/regions.ts @@ -17,8 +17,8 @@ */ import { Router, Request, Response } from "express"; -import { getIpAdress, route } from "@fosscord/api"; -import { getVoiceRegions } from "@fosscord/api"; +import { getIpAdress, route } from "@spacebar/api"; +import { getVoiceRegions } from "@spacebar/api"; const router: Router = Router(); diff --git a/src/api/start.ts b/src/api/start.ts index 6d35c67b..088c6f8d 100644 --- a/src/api/start.ts +++ b/src/api/start.ts @@ -23,7 +23,7 @@ process.on("unhandledRejection", console.error); import "missing-native-js-functions"; import { config } from "dotenv"; config(); -import { FosscordServer } from "./Server"; +import { SpacebarServer } from "./Server"; import cluster from "cluster"; import os from "os"; let cores = 1; @@ -48,7 +48,7 @@ if (cluster.isPrimary && process.env.NODE_ENV == "production") { } else { const port = Number(process.env.PORT) || 3001; - const server = new FosscordServer({ port }); + const server = new SpacebarServer({ port }); server.start().catch(console.error); // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/src/api/util/handlers/Instance.ts b/src/api/util/handlers/Instance.ts index bd9bf394..ccd56d92 100644 --- a/src/api/util/handlers/Instance.ts +++ b/src/api/util/handlers/Instance.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Session } from "@fosscord/util"; +import { Session } from "@spacebar/util"; export async function initInstance() { // TODO: clean up database and delete tombstone data diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts index 65dbcdfe..6172a3d0 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts @@ -41,10 +41,10 @@ import { Sticker, MessageCreateSchema, EmbedCache, -} from "@fosscord/util"; +} from "@spacebar/util"; import { HTTPError } from "lambert-server"; import { In } from "typeorm"; -import { EmbedHandlers } from "@fosscord/api"; +import { EmbedHandlers } from "@spacebar/api"; import * as Sentry from "@sentry/node"; const allow_empty = false; // TODO: check webhook, application, system author, stickers diff --git a/src/api/util/handlers/Voice.ts b/src/api/util/handlers/Voice.ts index 0880ab98..db06bd33 100644 --- a/src/api/util/handlers/Voice.ts +++ b/src/api/util/handlers/Voice.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import { distanceBetweenLocations, IPAnalysis } from "../utility/ipAddress"; export async function getVoiceRegions(ipAddress: string, vip: boolean) { diff --git a/src/api/util/handlers/route.ts b/src/api/util/handlers/route.ts index b0bc3af7..604df4e9 100644 --- a/src/api/util/handlers/route.ts +++ b/src/api/util/handlers/route.ts @@ -21,7 +21,7 @@ import { DiscordApiErrors, EVENT, FieldErrors, - FosscordApiErrors, + SpacebarApiErrors, getPermission, getRights, normalizeBody, @@ -29,7 +29,7 @@ import { Permissions, RightResolvable, Rights, -} from "@fosscord/util"; +} from "@spacebar/util"; import { NextFunction, Request, Response } from "express"; import { AnyValidateFunction } from "ajv/dist/core"; @@ -91,7 +91,7 @@ export function route(opts: RouteOptions) { req.rights = await getRights(req.user_id); if (!req.rights || !req.rights.has(required)) { - throw FosscordApiErrors.MISSING_RIGHTS.withParams( + throw SpacebarApiErrors.MISSING_RIGHTS.withParams( opts.right as string, ); } diff --git a/src/api/util/utility/EmbedHandlers.ts b/src/api/util/utility/EmbedHandlers.ts index 1e84e31a..15e3f67f 100644 --- a/src/api/util/utility/EmbedHandlers.ts +++ b/src/api/util/utility/EmbedHandlers.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config, Embed, EmbedType } from "@fosscord/util"; +import { Config, Embed, EmbedType } from "@spacebar/util"; import fetch, { RequestInit } from "node-fetch"; import * as cheerio from "cheerio"; import probe from "probe-image-size"; @@ -28,7 +28,7 @@ export const DEFAULT_FETCH_OPTIONS: RequestInit = { follow: 1, headers: { "user-agent": - "Mozilla/5.0 (compatible; Fosscord/1.0; +https://github.com/fosscord/fosscord)", + "Mozilla/5.0 (compatible; Spacebar/1.0; +https://github.com/spacebarchat/server)", }, // size: 1024 * 1024 * 5, // grabbed from config later compress: true, @@ -67,7 +67,7 @@ export const getProxyUrl = ( console.log( "[Embeds]", yellow( - "Imagor has not been set up correctly. https://docs.fosscord.com/setup/server/configuration/imagor/", + "Imagor has not been set up correctly. https://docs.spacebar.chat/setup/server/configuration/imagor/", ), ); } diff --git a/src/api/util/utility/RandomInviteID.ts b/src/api/util/utility/RandomInviteID.ts index e3eda606..926750d3 100644 --- a/src/api/util/utility/RandomInviteID.ts +++ b/src/api/util/utility/RandomInviteID.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Snowflake } from "@fosscord/util"; +import { Snowflake } from "@spacebar/util"; import crypto from "crypto"; // TODO: 'random'? seriously? who named this? diff --git a/src/api/util/utility/String.ts b/src/api/util/utility/String.ts index 7bc752f5..eef69e39 100644 --- a/src/api/util/utility/String.ts +++ b/src/api/util/utility/String.ts @@ -18,7 +18,7 @@ import { Request } from "express"; import { ntob } from "./Base64"; -import { FieldErrors } from "@fosscord/util"; +import { FieldErrors } from "@spacebar/util"; export function checkLength( str: string, diff --git a/src/api/util/utility/captcha.ts b/src/api/util/utility/captcha.ts index 28dba44b..db1b7957 100644 --- a/src/api/util/utility/captcha.ts +++ b/src/api/util/utility/captcha.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import fetch from "node-fetch"; export interface hcaptchaResponse { @@ -49,7 +49,7 @@ export async function verifyCaptcha(response: string, ip?: string) { if (!service || !secret || !sitekey) throw new Error( - "CAPTCHA is not configured correctly. https://docs.fosscord.com/setup/server/security/captcha/", + "CAPTCHA is not configured correctly. https://docs.spacebar.chat/setup/server/security/captcha/", ); const res = await fetch(verifyEndpoints[service], { diff --git a/src/api/util/utility/ipAddress.ts b/src/api/util/utility/ipAddress.ts index 4ae316fa..172e9604 100644 --- a/src/api/util/utility/ipAddress.ts +++ b/src/api/util/utility/ipAddress.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import { Request } from "express"; // use ipdata package instead of simple fetch because of integrated caching import fetch from "node-fetch"; diff --git a/src/api/util/utility/passwordStrength.ts b/src/api/util/utility/passwordStrength.ts index 4f3914c5..fd627fbf 100644 --- a/src/api/util/utility/passwordStrength.ts +++ b/src/api/util/utility/passwordStrength.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import "missing-native-js-functions"; const reNUMBER = /[0-9]/g; diff --git a/src/bundle/Server.ts b/src/bundle/Server.ts index 00ced932..6ba74be6 100644 --- a/src/bundle/Server.ts +++ b/src/bundle/Server.ts @@ -20,12 +20,12 @@ process.on("unhandledRejection", console.error); process.on("uncaughtException", console.error); import http from "http"; -import * as Api from "@fosscord/api"; -import * as Gateway from "@fosscord/gateway"; -import { CDNServer } from "@fosscord/cdn"; +import * as Api from "@spacebar/api"; +import * as Gateway from "@spacebar/gateway"; +import { CDNServer } from "@spacebar/cdn"; import express from "express"; import { green, bold } from "picocolors"; -import { Config, initDatabase, Sentry } from "@fosscord/util"; +import { Config, initDatabase, Sentry } from "@spacebar/util"; const app = express(); const server = http.createServer(); @@ -33,7 +33,7 @@ const port = Number(process.env.PORT) || 3001; const production = process.env.NODE_ENV == "development" ? false : true; server.on("request", app); -const api = new Api.FosscordServer({ server, port, production, app }); +const api = new Api.SpacebarServer({ server, port, production, app }); const cdn = new CDNServer({ server, port, production, app }); const gateway = new Gateway.Server({ server, port, production }); diff --git a/src/bundle/index.ts b/src/bundle/index.ts index 899c6b1f..c6af4f00 100644 --- a/src/bundle/index.ts +++ b/src/bundle/index.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -export * from "@fosscord/api"; -export * from "@fosscord/util"; -export * from "@fosscord/gateway"; -export * from "@fosscord/cdn"; +export * from "@spacebar/api"; +export * from "@spacebar/util"; +export * from "@spacebar/gateway"; +export * from "@spacebar/cdn"; diff --git a/src/bundle/start.ts b/src/bundle/start.ts index 96c5ccdf..df50fd4c 100644 --- a/src/bundle/start.ts +++ b/src/bundle/start.ts @@ -42,14 +42,14 @@ if (cluster.isPrimary) { console.log( bold(` -███████╗ ██████╗ ███████╗███████╗ ██████╗ ██████╗ ██████╗ ██████╗ -██╔════╝██╔═══██╗██╔════╝██╔════╝██╔════╝██╔═══██╗██╔══██╗██╔══██╗ -█████╗ ██║ ██║███████╗███████╗██║ ██║ ██║██████╔╝██║ ██║ -██╔══╝ ██║ ██║╚════██║╚════██║██║ ██║ ██║██╔══██╗██║ ██║ -██║ ╚██████╔╝███████║███████║╚██████╗╚██████╔╝██║ ██║██████╔╝ -╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ +███████╗██████╗ █████╗ ██████╗███████╗██████╗ █████╗ ██████╗ +██╔════╝██╔══██╗██╔══██╗██╔════╝██╔════╝██╔══██╗██╔══██╗██╔══██╗ +███████╗██████╔╝███████║██║ █████╗ ██████╔╝███████║██████╔╝ +╚════██║██╔═══╝ ██╔══██║██║ ██╔══╝ ██╔══██╗██╔══██║██╔══██╗ +███████║██║ ██║ ██║╚██████╗███████╗██████╔╝██║ ██║██║ ██║ +╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ - fosscord-server | ${yellow( + spacebar-server | ${yellow( `Pre-release (${ commit !== null ? commit.slice(0, 7) diff --git a/src/bundle/stats.ts b/src/bundle/stats.ts index 0073515e..b690eb75 100644 --- a/src/bundle/stats.ts +++ b/src/bundle/stats.ts @@ -33,7 +33,8 @@ export function initStats() { if (process.getuid && process.getuid() === 0) { console.warn( red( - `[Process] Warning fosscord is running as root, this highly discouraged and might expose your system vulnerable to attackers. Please run fosscord as a user without root privileges.`, + `[Process] Warning Spacebar is running as root, this highly discouraged and might expose your system vulnerable to attackers.` + + `Please run Spacebar as a user without root privileges.`, ), ); } diff --git a/src/cdn/Server.ts b/src/cdn/Server.ts index 543c84ae..255452a0 100644 --- a/src/cdn/Server.ts +++ b/src/cdn/Server.ts @@ -17,7 +17,7 @@ */ import { Server, ServerOptions } from "lambert-server"; -import { Config, initDatabase, registerRoutes, Sentry } from "@fosscord/util"; +import { Config, initDatabase, registerRoutes, Sentry } from "@spacebar/util"; import path from "path"; import avatarsRoute from "./routes/avatars"; import guildProfilesRoute from "./routes/guild-profiles"; diff --git a/src/cdn/routes/attachments.ts b/src/cdn/routes/attachments.ts index bfbe2489..19bb0b90 100644 --- a/src/cdn/routes/attachments.ts +++ b/src/cdn/routes/attachments.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { Config, Snowflake } from "@fosscord/util"; +import { Config, Snowflake } from "@spacebar/util"; import { storage } from "../util/Storage"; import FileType from "file-type"; import { HTTPError } from "lambert-server"; diff --git a/src/cdn/routes/avatars.ts b/src/cdn/routes/avatars.ts index 6d6f1d8e..6af3243f 100644 --- a/src/cdn/routes/avatars.ts +++ b/src/cdn/routes/avatars.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { Config, Snowflake } from "@fosscord/util"; +import { Config, Snowflake } from "@spacebar/util"; import { storage } from "../util/Storage"; import FileType from "file-type"; import { HTTPError } from "lambert-server"; diff --git a/src/cdn/routes/guild-profiles.ts b/src/cdn/routes/guild-profiles.ts index 5fc9519c..1ee5eeca 100644 --- a/src/cdn/routes/guild-profiles.ts +++ b/src/cdn/routes/guild-profiles.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config, Snowflake } from "@fosscord/util"; +import { Config, Snowflake } from "@spacebar/util"; import crypto from "crypto"; import { Request, Response, Router } from "express"; import FileType from "file-type"; diff --git a/src/cdn/routes/role-icons.ts b/src/cdn/routes/role-icons.ts index 6cc1d8ed..c7fb6e1a 100644 --- a/src/cdn/routes/role-icons.ts +++ b/src/cdn/routes/role-icons.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { Config, Snowflake } from "@fosscord/util"; +import { Config, Snowflake } from "@spacebar/util"; import { storage } from "../util/Storage"; import FileType from "file-type"; import { HTTPError } from "lambert-server"; diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts index 82fbe3b4..9fba2d4c 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts @@ -25,7 +25,7 @@ import { initDatabase, initEvent, Sentry, -} from "@fosscord/util"; +} from "@spacebar/util"; import ws from "ws"; import { Connection } from "./events/Connection"; import http from "http"; diff --git a/src/gateway/events/Close.ts b/src/gateway/events/Close.ts index fdb71f33..572037af 100644 --- a/src/gateway/events/Close.ts +++ b/src/gateway/events/Close.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; import { emitEvent, PresenceUpdateEvent, @@ -24,7 +24,7 @@ import { Session, SessionsReplace, User, -} from "@fosscord/util"; +} from "@spacebar/util"; export async function Close(this: WebSocket, code: number, reason: Buffer) { console.log("[WebSocket] closed", code, reason.toString()); diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts index 98ee06ff..68273ace 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts @@ -18,7 +18,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import WS from "ws"; -import { genSessionId, WebSocket } from "@fosscord/gateway"; +import { genSessionId, WebSocket } from "@spacebar/gateway"; import { Send } from "../util/Send"; import { CLOSECODES, OPCODES } from "../util/Constants"; import { setHeartbeat } from "../util/Heartbeat"; @@ -27,7 +27,7 @@ import { Close } from "./Close"; import { Message } from "./Message"; import { Deflate, Inflate } from "fast-zlib"; import { URL } from "url"; -import { Config, ErlpackType } from "@fosscord/util"; +import { Config, ErlpackType } from "@spacebar/util"; let erlpack: ErlpackType | null = null; try { diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts index 9dca9b33..45790146 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts @@ -16,11 +16,11 @@ along with this program. If not, see . */ -import { WebSocket, Payload, CLOSECODES, OPCODES } from "@fosscord/gateway"; +import { WebSocket, Payload, CLOSECODES, OPCODES } from "@spacebar/gateway"; import OPCodeHandlers from "../opcodes"; import { check } from "../opcodes/instanceOf"; import WS from "ws"; -import { PayloadSchema, ErlpackType } from "@fosscord/util"; +import { PayloadSchema, ErlpackType } from "@spacebar/util"; import * as Sentry from "@sentry/node"; import BigIntJson from "json-bigint"; import path from "path"; diff --git a/src/gateway/listener/listener.ts b/src/gateway/listener/listener.ts index bd4c0e66..b624b8e0 100644 --- a/src/gateway/listener/listener.ts +++ b/src/gateway/listener/listener.ts @@ -27,13 +27,13 @@ import { EVENTEnum, Relationship, RelationshipType, -} from "@fosscord/util"; +} from "@spacebar/util"; import { OPCODES } from "../util/Constants"; import { Send } from "../util/Send"; -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; import "missing-native-js-functions"; import { Channel as AMQChannel } from "amqplib"; -import { Recipient } from "@fosscord/util"; +import { Recipient } from "@spacebar/util"; // TODO: close connection on Invalidated Token // TODO: check intent diff --git a/src/gateway/opcodes/Heartbeat.ts b/src/gateway/opcodes/Heartbeat.ts index 14fb03a3..7866c3e9 100644 --- a/src/gateway/opcodes/Heartbeat.ts +++ b/src/gateway/opcodes/Heartbeat.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; import { setHeartbeat } from "../util/Heartbeat"; import { Send } from "../util/Send"; diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 16ba3f23..d3b55f0a 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket, Payload } from "@fosscord/gateway"; +import { WebSocket, Payload } from "@spacebar/gateway"; import { checkToken, Intents, @@ -43,14 +43,14 @@ import { ReadyGuildDTO, Guild, UserTokenData, -} from "@fosscord/util"; +} from "@spacebar/util"; import { Send } from "../util/Send"; import { CLOSECODES, OPCODES } from "../util/Constants"; import { setupListener } from "../listener/listener"; // import experiments from "./experiments.json"; const experiments: unknown[] = []; import { check } from "./instanceOf"; -import { Recipient } from "@fosscord/util"; +import { Recipient } from "@spacebar/util"; // TODO: user sharding // TODO: check privileged intents, if defined in the config diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts index 241a80f2..3cc2b655 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts @@ -26,14 +26,14 @@ import { LazyRequestSchema, User, Presence, -} from "@fosscord/util"; +} from "@spacebar/util"; import { WebSocket, Payload, handlePresenceUpdate, OPCODES, Send, -} from "@fosscord/gateway"; +} from "@spacebar/gateway"; import { check } from "./instanceOf"; // TODO: only show roles/members that have access to this channel diff --git a/src/gateway/opcodes/PresenceUpdate.ts b/src/gateway/opcodes/PresenceUpdate.ts index d570a1f7..03736263 100644 --- a/src/gateway/opcodes/PresenceUpdate.ts +++ b/src/gateway/opcodes/PresenceUpdate.ts @@ -16,14 +16,14 @@ along with this program. If not, see . */ -import { WebSocket, Payload } from "@fosscord/gateway"; +import { WebSocket, Payload } from "@spacebar/gateway"; import { emitEvent, PresenceUpdateEvent, Session, User, ActivitySchema, -} from "@fosscord/util"; +} from "@spacebar/util"; import { check } from "./instanceOf"; export async function onPresenceUpdate(this: WebSocket, { d }: Payload) { diff --git a/src/gateway/opcodes/RequestGuildMembers.ts b/src/gateway/opcodes/RequestGuildMembers.ts index cb6bff98..304d4b39 100644 --- a/src/gateway/opcodes/RequestGuildMembers.ts +++ b/src/gateway/opcodes/RequestGuildMembers.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; export function onRequestGuildMembers(this: WebSocket) { // return this.close(CLOSECODES.Unknown_error); diff --git a/src/gateway/opcodes/Resume.ts b/src/gateway/opcodes/Resume.ts index 92e9e67c..3e43d648 100644 --- a/src/gateway/opcodes/Resume.ts +++ b/src/gateway/opcodes/Resume.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; import { Send } from "../util/Send"; export async function onResume(this: WebSocket) { diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts index 49083124..ffc143ed 100644 --- a/src/gateway/opcodes/VoiceStateUpdate.ts +++ b/src/gateway/opcodes/VoiceStateUpdate.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Payload, WebSocket } from "@fosscord/gateway"; +import { Payload, WebSocket } from "@spacebar/gateway"; import { genVoiceToken } from "../util/SessionUtils"; import { check } from "./instanceOf"; import { @@ -29,7 +29,7 @@ import { VoiceStateUpdateEvent, VoiceStateUpdateSchema, Region, -} from "@fosscord/util"; +} from "@spacebar/util"; // TODO: check if a voice server is setup // Notice: Bot users respect the voice channel's user limit, if set. diff --git a/src/gateway/opcodes/index.ts b/src/gateway/opcodes/index.ts index d24877f7..cf2338e6 100644 --- a/src/gateway/opcodes/index.ts +++ b/src/gateway/opcodes/index.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket, Payload } from "@fosscord/gateway"; +import { WebSocket, Payload } from "@spacebar/gateway"; import { onHeartbeat } from "./Heartbeat"; import { onIdentify } from "./Identify"; import { onLazyRequest } from "./LazyRequest"; diff --git a/src/gateway/opcodes/instanceOf.ts b/src/gateway/opcodes/instanceOf.ts index 4ffcaa9c..39bece16 100644 --- a/src/gateway/opcodes/instanceOf.ts +++ b/src/gateway/opcodes/instanceOf.ts @@ -17,7 +17,7 @@ */ import { instanceOf } from "lambert-server"; -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; import { CLOSECODES } from "../util/Constants"; export function check(this: WebSocket, schema: unknown, data: unknown) { diff --git a/src/gateway/util/Constants.ts b/src/gateway/util/Constants.ts index 5fe2f151..5c0f134a 100644 --- a/src/gateway/util/Constants.ts +++ b/src/gateway/util/Constants.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -// import { VoiceOPCodes } from "@fosscord/webrtc"; +// import { VoiceOPCodes } from "@spacebar/webrtc"; export enum OPCODES { Dispatch = 0, diff --git a/src/gateway/util/Send.ts b/src/gateway/util/Send.ts index 6f1c78e1..57f87d8b 100644 --- a/src/gateway/util/Send.ts +++ b/src/gateway/util/Send.ts @@ -16,11 +16,11 @@ along with this program. If not, see . */ -import { Payload, WebSocket } from "@fosscord/gateway"; +import { Payload, WebSocket } from "@spacebar/gateway"; import fs from "fs/promises"; import path from "path"; -import { ErlpackType, JSONReplacer } from "@fosscord/util"; +import { ErlpackType, JSONReplacer } from "@spacebar/util"; let erlpack: ErlpackType | null = null; try { erlpack = require("erlpack") as ErlpackType; diff --git a/src/gateway/util/WebSocket.ts b/src/gateway/util/WebSocket.ts index 65c48142..972129c7 100644 --- a/src/gateway/util/WebSocket.ts +++ b/src/gateway/util/WebSocket.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { Intents, ListenEventOpts, Permissions } from "@fosscord/util"; +import { Intents, ListenEventOpts, Permissions } from "@spacebar/util"; import WS from "ws"; import { Deflate, Inflate } from "fast-zlib"; -// import { Client } from "@fosscord/webrtc"; +// import { Client } from "@spacebar/webrtc"; export interface WebSocket extends WS { version: number; diff --git a/src/util/config/types/ApiConfiguration.ts b/src/util/config/types/ApiConfiguration.ts index 03717dcf..4d61521a 100644 --- a/src/util/config/types/ApiConfiguration.ts +++ b/src/util/config/types/ApiConfiguration.ts @@ -19,6 +19,5 @@ export class ApiConfiguration { defaultVersion: string = "9"; activeVersions: string[] = ["6", "7", "8", "9"]; - useFosscordEnhancements: boolean = true; endpointPublic: string = "/api"; } diff --git a/src/util/config/types/GeneralConfiguration.ts b/src/util/config/types/GeneralConfiguration.ts index 53cfea5f..c20fe9a7 100644 --- a/src/util/config/types/GeneralConfiguration.ts +++ b/src/util/config/types/GeneralConfiguration.ts @@ -16,12 +16,12 @@ along with this program. If not, see . */ -import { Snowflake } from "@fosscord/util"; +import { Snowflake } from "@spacebar/util"; export class GeneralConfiguration { - instanceName: string = "Fosscord Instance"; + instanceName: string = "Spacebar Instance"; instanceDescription: string | null = - "This is a Fosscord instance made in the pre-release days"; + "This is a Spacebar instance made in the pre-release days"; frontPage: string | null = null; tosPage: string | null = null; correspondenceEmail: string | null = null; diff --git a/src/util/config/types/RegionConfiguration.ts b/src/util/config/types/RegionConfiguration.ts index 2d9ff502..8cd11fc0 100644 --- a/src/util/config/types/RegionConfiguration.ts +++ b/src/util/config/types/RegionConfiguration.ts @@ -19,12 +19,12 @@ import { Region } from "."; export class RegionConfiguration { - default: string = "fosscord"; + default: string = "spacebar"; useDefaultAsOptimal: boolean = true; available: Region[] = [ { - id: "fosscord", - name: "Fosscord", + id: "spacebar", + name: "spacebar", endpoint: "127.0.0.1:3004", vip: false, custom: false, diff --git a/src/util/entities/AuditLog.ts b/src/util/entities/AuditLog.ts index e47f92fb..b375f771 100644 --- a/src/util/entities/AuditLog.ts +++ b/src/util/entities/AuditLog.ts @@ -100,7 +100,7 @@ export enum AuditLogEvents { POLICY_CREATE = 140, POLICY_UPDATE = 141, POLICY_DELETE = 142, - MESSAGE_BLOCKED_BY_POLICIES = 143, // in fosscord, blocked messages are stealth-dropped + MESSAGE_BLOCKED_BY_POLICIES = 143, // in spacebar, blocked messages are stealth-dropped // instance policies affecting the guild GUILD_AFFECTED_BY_POLICIES = 216, // message moves diff --git a/src/util/entities/Emoji.ts b/src/util/entities/Emoji.ts index f1bf2d59..0bc2f423 100644 --- a/src/util/entities/Emoji.ts +++ b/src/util/entities/Emoji.ts @@ -59,5 +59,5 @@ export class Emoji extends BaseClass { roles: string[]; // roles this emoji is whitelisted to (new discord feature?) @Column({ type: "simple-array", nullable: true }) - groups: string[]; // user groups this emoji is whitelisted to (Fosscord extension) + groups: string[]; // user groups this emoji is whitelisted to (Spacebar extension) } diff --git a/src/util/entities/Guild.ts b/src/util/entities/Guild.ts index b1693838..e8454986 100644 --- a/src/util/entities/Guild.ts +++ b/src/util/entities/Guild.ts @@ -319,7 +319,7 @@ export class Guild extends BaseClass { const guild = await Guild.create({ id: guild_id, - name: body.name || "Fosscord", + name: body.name || "Spacebar", icon: await handleFile(`/icons/${guild_id}`, body.icon as string), owner_id: body.owner_id, // TODO: need to figure out a way for ownerless guilds and multiply-owned guilds presence_count: 0, @@ -346,7 +346,7 @@ export class Guild extends BaseClass { color: 0, hoist: false, managed: false, - // NB: in Fosscord, every role will be non-managed, as we use user-groups instead of roles for managed groups + // NB: in Spacebar, every role will be non-managed, as we use user-groups instead of roles for managed groups mentionable: false, name: "@everyone", permissions: String("2251804225"), diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts index e5f2e82c..3019709f 100644 --- a/src/util/entities/Invite.ts +++ b/src/util/entities/Invite.ts @@ -86,7 +86,7 @@ export class Invite extends BaseClassWithoutId { @ManyToOne(() => User, { onDelete: "CASCADE", }) - target_user?: string; // could be used for "User specific invites" https://github.com/fosscord/fosscord/issues/62 + target_user?: string; // could be used for "User specific invites" https://github.com/spacebarchat/server/issues/326 @Column({ nullable: true }) target_user_type?: number; diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts index 6913a815..3a0eadc5 100644 --- a/src/util/interfaces/Event.ts +++ b/src/util/interfaces/Event.ts @@ -40,7 +40,7 @@ import { UserSettings, IReadyGuildDTO, ReadState, -} from "@fosscord/util"; +} from "@spacebar/util"; export interface Event { guild_id?: string; diff --git a/src/util/schemas/ActivitySchema.ts b/src/util/schemas/ActivitySchema.ts index f1a48f44..f168f967 100644 --- a/src/util/schemas/ActivitySchema.ts +++ b/src/util/schemas/ActivitySchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Activity, Status } from "@fosscord/util"; +import { Activity, Status } from "@spacebar/util"; export const ActivitySchema = { $afk: Boolean, diff --git a/src/util/schemas/ChannelModifySchema.ts b/src/util/schemas/ChannelModifySchema.ts index 2f6eb7ae..088ac459 100644 --- a/src/util/schemas/ChannelModifySchema.ts +++ b/src/util/schemas/ChannelModifySchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { ChannelPermissionOverwriteType, ChannelType } from "@fosscord/util"; +import { ChannelPermissionOverwriteType, ChannelType } from "@spacebar/util"; export interface ChannelModifySchema { /** diff --git a/src/util/schemas/ChannelPermissionOverwriteSchema.ts b/src/util/schemas/ChannelPermissionOverwriteSchema.ts index 18602300..6e8b3402 100644 --- a/src/util/schemas/ChannelPermissionOverwriteSchema.ts +++ b/src/util/schemas/ChannelPermissionOverwriteSchema.ts @@ -16,6 +16,6 @@ along with this program. If not, see . */ -import { ChannelPermissionOverwrite } from "@fosscord/util"; +import { ChannelPermissionOverwrite } from "@spacebar/util"; export type ChannelPermissionOverwriteSchema = ChannelPermissionOverwrite; diff --git a/src/util/schemas/GuildUpdateSchema.ts b/src/util/schemas/GuildUpdateSchema.ts index 8fb4127e..19316380 100644 --- a/src/util/schemas/GuildUpdateSchema.ts +++ b/src/util/schemas/GuildUpdateSchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { GuildCreateSchema } from "@fosscord/util"; +import { GuildCreateSchema } from "@spacebar/util"; export interface GuildUpdateSchema extends Omit { diff --git a/src/util/schemas/IdentifySchema.ts b/src/util/schemas/IdentifySchema.ts index d2b716ea..fb48c2a4 100644 --- a/src/util/schemas/IdentifySchema.ts +++ b/src/util/schemas/IdentifySchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { ActivitySchema } from "@fosscord/util"; +import { ActivitySchema } from "@spacebar/util"; // TODO: Need a way to allow camalCase and pascal_case without just duplicating the schema diff --git a/src/util/schemas/MessageCreateSchema.ts b/src/util/schemas/MessageCreateSchema.ts index 5b925457..45cd735e 100644 --- a/src/util/schemas/MessageCreateSchema.ts +++ b/src/util/schemas/MessageCreateSchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Embed } from "@fosscord/util"; +import { Embed } from "@spacebar/util"; type Attachment = { id: string; diff --git a/src/util/schemas/RelationshipPutSchema.ts b/src/util/schemas/RelationshipPutSchema.ts index 33f827eb..36d9877d 100644 --- a/src/util/schemas/RelationshipPutSchema.ts +++ b/src/util/schemas/RelationshipPutSchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { RelationshipType } from "@fosscord/util"; +import { RelationshipType } from "@spacebar/util"; export interface RelationshipPutSchema { type?: RelationshipType; diff --git a/src/util/schemas/UserGuildSettingsSchema.ts b/src/util/schemas/UserGuildSettingsSchema.ts index 967e29de..c295f767 100644 --- a/src/util/schemas/UserGuildSettingsSchema.ts +++ b/src/util/schemas/UserGuildSettingsSchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { UserGuildSettings, ChannelOverride } from "@fosscord/util"; +import { UserGuildSettings, ChannelOverride } from "@spacebar/util"; // This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema export interface UserGuildSettingsSchema diff --git a/src/util/schemas/UserSettingsSchema.ts b/src/util/schemas/UserSettingsSchema.ts index bad34700..0d23e757 100644 --- a/src/util/schemas/UserSettingsSchema.ts +++ b/src/util/schemas/UserSettingsSchema.ts @@ -16,6 +16,6 @@ along with this program. If not, see . */ -import { UserSettings } from "@fosscord/util"; +import { UserSettings } from "@spacebar/util"; export type UserSettingsSchema = Omit, "index">; diff --git a/src/util/util/AutoUpdate.ts b/src/util/util/AutoUpdate.ts index 8365d9ae..1f90a41e 100644 --- a/src/util/util/AutoUpdate.ts +++ b/src/util/util/AutoUpdate.ts @@ -78,8 +78,8 @@ async function download(url: string, dir: string) { const agent = new ProxyAgent(); const response = await fetch(url, { agent }); const buffer = await response.buffer(); - const tempDir = await fs.mkdtemp("fosscord"); - await fs.writeFile(path.join(tempDir, "Fosscord.zip"), buffer); + const tempDir = await fs.mkdtemp("spacebar"); + await fs.writeFile(path.join(tempDir, "Spacebar.zip"), buffer); } catch (error) { console.error(`[Auto Update] download failed`, error); } diff --git a/src/util/util/Constants.ts b/src/util/util/Constants.ts index 0d1d721e..d4adb54e 100644 --- a/src/util/util/Constants.ts +++ b/src/util/util/Constants.ts @@ -1001,9 +1001,9 @@ export const DiscordApiErrors = { }; /** - * An error encountered while performing an API request (Fosscord only). Here are the potential errors: + * An error encountered while performing an API request (Spacebar only). Here are the potential errors: */ -export const FosscordApiErrors = { +export const SpacebarApiErrors = { MANUALLY_TRIGGERED_ERROR: new ApiError( "This is an artificial error", 1, @@ -1101,7 +1101,7 @@ export const FosscordApiErrors = { * The value set for a guild's default message notifications, e.g. `ALL`. Here are the available types: * * ALL * * MENTIONS - * * MUTED (Fosscord extension) + * * MUTED (Spacebar extension) * @typedef {string} DefaultMessageNotifications */ export const DefaultMessageNotifications = ["ALL", "MENTIONS", "MUTED"]; @@ -1110,7 +1110,7 @@ export const DefaultMessageNotifications = ["ALL", "MENTIONS", "MUTED"]; * The value set for a team members's membership state: * * INVITED * * ACCEPTED - * * INSERTED (Fosscord extension) + * * INSERTED (Spacebar extension) * @typedef {string} MembershipStates */ export const MembershipStates = ["INSERTED", "INVITED", "ACCEPTED"]; @@ -1119,7 +1119,7 @@ export const MembershipStates = ["INSERTED", "INVITED", "ACCEPTED"]; * The value set for a webhook's type: * * Incoming * * Channel Follower - * * Custom (Fosscord extension) + * * Custom (Spacebar extension) * @typedef {string} WebhookTypes */ export const WebhookTypes = ["Custom", "Incoming", "Channel Follower"]; diff --git a/src/util/util/Database.ts b/src/util/util/Database.ts index e23bb895..a6b24b3e 100644 --- a/src/util/util/Database.ts +++ b/src/util/util/Database.ts @@ -83,7 +83,7 @@ export async function initDatabase(): Promise { "[Database]" + red( ` We don't have migrations for DB type '${DatabaseType}'` + - ` To ignore, set DB_SYNC=true in your env. https://docs.fosscord.com/setup/server/configuration/env/`, + ` To ignore, set DB_SYNC=true in your env. https://docs.spacebar.chat/setup/server/configuration/env/`, ), ); process.exit(); diff --git a/src/util/util/MessageFlags.ts b/src/util/util/MessageFlags.ts index 35ba9e2a..b2ea41d0 100644 --- a/src/util/util/MessageFlags.ts +++ b/src/util/util/MessageFlags.ts @@ -9,9 +9,9 @@ export class MessageFlags extends BitField { CROSSPOSTED: BigInt(1) << BigInt(0), IS_CROSSPOST: BigInt(1) << BigInt(1), SUPPRESS_EMBEDS: BigInt(1) << BigInt(2), - // SOURCE_MESSAGE_DELETED: BigInt(1) << BigInt(3), // fosscord will delete them from destination too, making this redundant + // SOURCE_MESSAGE_DELETED: BigInt(1) << BigInt(3), // spacebar will delete them from destination too, making this redundant URGENT: BigInt(1) << BigInt(4), - // HAS_THREAD: BigInt(1) << BigInt(5) // does not apply to fosscord due to infrastructural differences + // HAS_THREAD: BigInt(1) << BigInt(5) // does not apply to spacebar due to infrastructural differences PRIVATE_ROUTE: BigInt(1) << BigInt(6), // it that has been routed to only some of the users that can see the channel INTERACTION_WAIT: BigInt(1) << BigInt(7), // discord.com calls this LOADING // FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: BigInt(1) << BigInt(8) diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts index 50e63c5f..90310176 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts @@ -69,7 +69,7 @@ export function checkToken( token = token.replace("Bot ", ""); token = token.replace("Bearer ", ""); /** - in fosscord, even with instances that have bot distinction; we won't enforce "Bot" prefix, + in spacebar, even with instances that have bot distinction; we won't enforce "Bot" prefix, as we don't really have separate pathways for bots **/ diff --git a/src/util/util/email/transports/MailGun.ts b/src/util/util/email/transports/MailGun.ts index f6529518..badc9880 100644 --- a/src/util/util/email/transports/MailGun.ts +++ b/src/util/util/email/transports/MailGun.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import nodemailer from "nodemailer"; export default async function () { diff --git a/src/util/util/email/transports/MailJet.ts b/src/util/util/email/transports/MailJet.ts index 336fa97a..69be7acf 100644 --- a/src/util/util/email/transports/MailJet.ts +++ b/src/util/util/email/transports/MailJet.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import nodemailer from "nodemailer"; export default async function () { diff --git a/src/util/util/email/transports/SMTP.ts b/src/util/util/email/transports/SMTP.ts index a6e06e52..5b43a870 100644 --- a/src/util/util/email/transports/SMTP.ts +++ b/src/util/util/email/transports/SMTP.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import nodemailer from "nodemailer"; export default async function () { diff --git a/src/util/util/email/transports/SendGrid.ts b/src/util/util/email/transports/SendGrid.ts index 1d2e366c..a863d3ec 100644 --- a/src/util/util/email/transports/SendGrid.ts +++ b/src/util/util/email/transports/SendGrid.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config } from "@fosscord/util"; +import { Config } from "@spacebar/util"; import nodemailer from "nodemailer"; export default async function () { diff --git a/src/webrtc/Server.ts b/src/webrtc/Server.ts index 8b86236e..0ba2e41b 100644 --- a/src/webrtc/Server.ts +++ b/src/webrtc/Server.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { closeDatabase, Config, initDatabase, initEvent } from "@fosscord/util"; +import { closeDatabase, Config, initDatabase, initEvent } from "@spacebar/util"; import dotenv from "dotenv"; import http from "http"; import ws from "ws"; diff --git a/src/webrtc/events/Close.ts b/src/webrtc/events/Close.ts index ba2a3142..7b71e9ce 100644 --- a/src/webrtc/events/Close.ts +++ b/src/webrtc/events/Close.ts @@ -16,8 +16,8 @@ along with this program. If not, see . */ -import { WebSocket } from "@fosscord/gateway"; -import { Session } from "@fosscord/util"; +import { WebSocket } from "@spacebar/gateway"; +import { Session } from "@spacebar/util"; export async function onClose(this: WebSocket, code: number, reason: string) { console.log("[WebRTC] closed", code, reason.toString()); diff --git a/src/webrtc/events/Connection.ts b/src/webrtc/events/Connection.ts index d8b4d683..6c5bab03 100644 --- a/src/webrtc/events/Connection.ts +++ b/src/webrtc/events/Connection.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { CLOSECODES, Send, setHeartbeat, WebSocket } from "@fosscord/gateway"; +import { CLOSECODES, Send, setHeartbeat, WebSocket } from "@spacebar/gateway"; import { IncomingMessage } from "http"; import { URL } from "url"; import WS from "ws"; diff --git a/src/webrtc/events/Message.ts b/src/webrtc/events/Message.ts index dac9095e..22189e95 100644 --- a/src/webrtc/events/Message.ts +++ b/src/webrtc/events/Message.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { CLOSECODES, Payload, WebSocket } from "@fosscord/gateway"; +import { CLOSECODES, Payload, WebSocket } from "@spacebar/gateway"; import { Tuple } from "lambert-server"; import OPCodeHandlers from "../opcodes"; import { VoiceOPCodes } from "../util"; diff --git a/src/webrtc/opcodes/BackendVersion.ts b/src/webrtc/opcodes/BackendVersion.ts index b466c300..60de3e58 100644 --- a/src/webrtc/opcodes/BackendVersion.ts +++ b/src/webrtc/opcodes/BackendVersion.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Payload, Send, WebSocket } from "@fosscord/gateway"; +import { Payload, Send, WebSocket } from "@spacebar/gateway"; import { VoiceOPCodes } from "../util"; export async function onBackendVersion(this: WebSocket, data: Payload) { diff --git a/src/webrtc/opcodes/Heartbeat.ts b/src/webrtc/opcodes/Heartbeat.ts index 95e991ad..3d8e187b 100644 --- a/src/webrtc/opcodes/Heartbeat.ts +++ b/src/webrtc/opcodes/Heartbeat.ts @@ -22,7 +22,7 @@ import { Send, setHeartbeat, WebSocket, -} from "@fosscord/gateway"; +} from "@spacebar/gateway"; import { VoiceOPCodes } from "../util"; export async function onHeartbeat(this: WebSocket, data: Payload) { diff --git a/src/webrtc/opcodes/Identify.ts b/src/webrtc/opcodes/Identify.ts index 9a9904df..3f65127e 100644 --- a/src/webrtc/opcodes/Identify.ts +++ b/src/webrtc/opcodes/Identify.ts @@ -16,13 +16,13 @@ along with this program. If not, see . */ -import { CLOSECODES, Payload, Send, WebSocket } from "@fosscord/gateway"; +import { CLOSECODES, Payload, Send, WebSocket } from "@spacebar/gateway"; import { validateSchema, VoiceIdentifySchema, VoiceState, -} from "@fosscord/util"; -import { endpoint, getClients, VoiceOPCodes, PublicIP } from "@fosscord/webrtc"; +} from "@spacebar/util"; +import { endpoint, getClients, VoiceOPCodes, PublicIP } from "@spacebar/webrtc"; import SemanticSDP from "semantic-sdp"; const defaultSDP = require("./sdp.json"); diff --git a/src/webrtc/opcodes/SelectProtocol.ts b/src/webrtc/opcodes/SelectProtocol.ts index 798a1046..6618d83b 100644 --- a/src/webrtc/opcodes/SelectProtocol.ts +++ b/src/webrtc/opcodes/SelectProtocol.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Payload, Send, WebSocket } from "@fosscord/gateway"; -import { SelectProtocolSchema, validateSchema } from "@fosscord/util"; -import { endpoint, PublicIP, VoiceOPCodes } from "@fosscord/webrtc"; +import { Payload, Send, WebSocket } from "@spacebar/gateway"; +import { SelectProtocolSchema, validateSchema } from "@spacebar/util"; +import { endpoint, PublicIP, VoiceOPCodes } from "@spacebar/webrtc"; import SemanticSDP, { MediaInfo, SDPInfo } from "semantic-sdp"; export async function onSelectProtocol(this: WebSocket, payload: Payload) { diff --git a/src/webrtc/opcodes/Speaking.ts b/src/webrtc/opcodes/Speaking.ts index dbdbcdaa..97055e0a 100644 --- a/src/webrtc/opcodes/Speaking.ts +++ b/src/webrtc/opcodes/Speaking.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Payload, Send, WebSocket } from "@fosscord/gateway"; +import { Payload, Send, WebSocket } from "@spacebar/gateway"; import { getClients, VoiceOPCodes } from "../util"; // {"speaking":1,"delay":5,"ssrc":2805246727} diff --git a/src/webrtc/opcodes/Video.ts b/src/webrtc/opcodes/Video.ts index 8fd6a9e3..3228d4ee 100644 --- a/src/webrtc/opcodes/Video.ts +++ b/src/webrtc/opcodes/Video.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ -import { Payload, Send, WebSocket } from "@fosscord/gateway"; -import { validateSchema, VoiceVideoSchema } from "@fosscord/util"; -import { channels, getClients, VoiceOPCodes } from "@fosscord/webrtc"; +import { Payload, Send, WebSocket } from "@spacebar/gateway"; +import { validateSchema, VoiceVideoSchema } from "@spacebar/util"; +import { channels, getClients, VoiceOPCodes } from "@spacebar/webrtc"; import { IncomingStreamTrack, SSRCs } from "medooze-media-server"; import SemanticSDP from "semantic-sdp"; diff --git a/src/webrtc/opcodes/index.ts b/src/webrtc/opcodes/index.ts index f0ee23c4..34681055 100644 --- a/src/webrtc/opcodes/index.ts +++ b/src/webrtc/opcodes/index.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Payload, WebSocket } from "@fosscord/gateway"; +import { Payload, WebSocket } from "@spacebar/gateway"; import { VoiceOPCodes } from "../util"; import { onBackendVersion } from "./BackendVersion"; import { onHeartbeat } from "./Heartbeat"; diff --git a/src/webrtc/util/MediaServer.ts b/src/webrtc/util/MediaServer.ts index fcc1375d..0c12876c 100644 --- a/src/webrtc/util/MediaServer.ts +++ b/src/webrtc/util/MediaServer.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { WebSocket } from "@fosscord/gateway"; +import { WebSocket } from "@spacebar/gateway"; import MediaServer, { IncomingStream, OutgoingStream, -- cgit 1.4.1