summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-10-23 14:04:08 +0200
committerRory& <root@rory.gay>2025-12-17 10:10:08 +0100
commitbf33c9874b87327d11e7f3152feb6866e466777e (patch)
treed642938b9f5a4d742627d95ee6cf05572787d0ee
parentFix webstorm runconfigs (diff)
downloadserver-ts-bf33c9874b87327d11e7f3152feb6866e466777e.tar.xz
Move region to webrtc schemas
-rw-r--r--src/gateway/opcodes/VoiceStateUpdate.ts4
-rw-r--r--src/schemas/webrtc/Region.ts (renamed from src/util/config/types/subconfigurations/region/Region.ts)0
-rw-r--r--src/schemas/webrtc/index.ts2
-rw-r--r--src/util/config/types/RegionConfiguration.ts2
-rw-r--r--src/util/config/types/subconfigurations/index.ts1
-rw-r--r--src/util/config/types/subconfigurations/region/index.ts19
6 files changed, 5 insertions, 23 deletions
diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts

index a2922e0c..ea7f29e0 100644 --- a/src/gateway/opcodes/VoiceStateUpdate.ts +++ b/src/gateway/opcodes/VoiceStateUpdate.ts
@@ -17,10 +17,10 @@ */ import { Payload, WebSocket } from "@spacebar/gateway"; -import { Config, emitEvent, Guild, Member, Region, VoiceServerUpdateEvent, VoiceState, VoiceStateUpdateEvent } from "@spacebar/util"; +import { Config, emitEvent, Guild, Member, VoiceServerUpdateEvent, VoiceState, VoiceStateUpdateEvent } from "@spacebar/util"; import { genVoiceToken } from "../util/SessionUtils"; import { check } from "./instanceOf"; -import { VoiceStateUpdateSchema } from "@spacebar/schemas"; +import { Region, VoiceStateUpdateSchema } from "@spacebar/schemas"; // TODO: check if a voice server is setup // Notice: Bot users respect the voice channel's user limit, if set. diff --git a/src/util/config/types/subconfigurations/region/Region.ts b/src/schemas/webrtc/Region.ts
index 1b8171ff..1b8171ff 100644 --- a/src/util/config/types/subconfigurations/region/Region.ts +++ b/src/schemas/webrtc/Region.ts
diff --git a/src/schemas/webrtc/index.ts b/src/schemas/webrtc/index.ts
index 7be4af62..b25b57df 100644 --- a/src/schemas/webrtc/index.ts +++ b/src/schemas/webrtc/index.ts
@@ -15,5 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ + export * from "./VoiceIdentifySchema"; export * from "./VoiceVideoSchema"; +export * from "./Region" \ No newline at end of file diff --git a/src/util/config/types/RegionConfiguration.ts b/src/util/config/types/RegionConfiguration.ts
index 8cd11fc0..b6c11b07 100644 --- a/src/util/config/types/RegionConfiguration.ts +++ b/src/util/config/types/RegionConfiguration.ts
@@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Region } from "."; +import { Region } from "@spacebar/schemas"; export class RegionConfiguration { default: string = "spacebar"; diff --git a/src/util/config/types/subconfigurations/index.ts b/src/util/config/types/subconfigurations/index.ts
index 400fb45e..2f4eb1ce 100644 --- a/src/util/config/types/subconfigurations/index.ts +++ b/src/util/config/types/subconfigurations/index.ts
@@ -21,6 +21,5 @@ export * from "./defaults"; export * from "./guild"; export * from "./kafka"; export * from "./limits"; -export * from "./region"; export * from "./register"; export * from "./security"; diff --git a/src/util/config/types/subconfigurations/region/index.ts b/src/util/config/types/subconfigurations/region/index.ts deleted file mode 100644
index cc5447b0..00000000 --- a/src/util/config/types/subconfigurations/region/index.ts +++ /dev/null
@@ -1,19 +0,0 @@ -/* - Spacebar: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Spacebar and Spacebar Contributors - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. -*/ - -export * from "./Region";