mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
testing
This commit is contained in:
1 parent
27d7cc7c94
commit
f86f0c5f8b
4 files changed
+32
-9
No files matched your search
@@ -6,7 +6,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fluxerjs/core": "^1.3.1",
|
"@fluxerjs/core": "^1.3.1",
|
||||||
"@fluxerjs/voice": "^1.3.1",
|
"@fluxerjs/voice": "^1.3.1",
|
||||||
"@livekit/rtc-node": "^0.13.27",
|
|
||||||
"bcryptjs": "^3.0.3",
|
"bcryptjs": "^3.0.3",
|
||||||
"express": "^5.2.1",
|
"express": "^5.2.1",
|
||||||
"ffmpeg-static": "^5.3.0",
|
"ffmpeg-static": "^5.3.0",
|
||||||
|
|||||||
@@ -1395,13 +1395,11 @@ export class GatewayHandler {
|
|||||||
try {
|
try {
|
||||||
const set = remix.settingsMgr.getServer(guildId);
|
const set = remix.settingsMgr.getServer(guildId);
|
||||||
if (set) {
|
if (set) {
|
||||||
|
remove247ChannelMode(set, channelId);
|
||||||
const raw = set.get("stay_247");
|
const raw = set.get("stay_247");
|
||||||
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
||||||
const channels = new Set(
|
const filtered = arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId);
|
||||||
arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
|
set.set("stay_247", filtered.length > 0 ? filtered : "none");
|
||||||
);
|
|
||||||
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
|
|
||||||
remove247ChannelMode(set, channelId, channels);
|
|
||||||
}
|
}
|
||||||
} catch (cleanupErr) {
|
} catch (cleanupErr) {
|
||||||
logger.warn(`[BootRecovery] Failed to auto-remove missing channel ${channelId} from 24/7:`, cleanupErr?.message);
|
logger.warn(`[BootRecovery] Failed to auto-remove missing channel ${channelId} from 24/7:`, cleanupErr?.message);
|
||||||
|
|||||||
+14
-1
@@ -14,7 +14,20 @@
|
|||||||
|
|
||||||
import Revoicejs from "revoice.js";
|
import Revoicejs from "revoice.js";
|
||||||
const { MediaPlayer } = Revoicejs;
|
const { MediaPlayer } = Revoicejs;
|
||||||
import { ConnectionState, RoomEvent as LKRoomEvent } from "@livekit/rtc-node";
|
|
||||||
|
const ConnectionState = Object.freeze({
|
||||||
|
CONN_DISCONNECTED: 0,
|
||||||
|
CONN_CONNECTED: 1,
|
||||||
|
CONN_RECONNECTING: 2,
|
||||||
|
});
|
||||||
|
|
||||||
|
const LKRoomEvent = Object.freeze({
|
||||||
|
ConnectionStateChanged: "connectionStateChanged",
|
||||||
|
Disconnected: "disconnected",
|
||||||
|
ParticipantConnected: "participantConnected",
|
||||||
|
ParticipantDisconnected:"participantDisconnected",
|
||||||
|
});
|
||||||
|
|
||||||
import { getVoiceManager } from "@fluxerjs/voice";
|
import { getVoiceManager } from "@fluxerjs/voice";
|
||||||
import { Utils } from "./Utils.mjs";
|
import { Utils } from "./Utils.mjs";
|
||||||
import { EventEmitter } from "node:events";
|
import { EventEmitter } from "node:events";
|
||||||
|
|||||||
@@ -27,8 +27,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { EventEmitter } from "node:events";
|
import { EventEmitter } from "node:events";
|
||||||
import { Room, RoomEvent, ConnectionState } from "@livekit/rtc-node";
|
|
||||||
import { joinVoiceChannel, getVoiceManager } from "@fluxerjs/voice";
|
import { joinVoiceChannel, getVoiceManager } from "@fluxerjs/voice";
|
||||||
|
|
||||||
|
const ConnectionState = Object.freeze({
|
||||||
|
CONN_DISCONNECTED: 0,
|
||||||
|
CONN_CONNECTED: 1,
|
||||||
|
CONN_RECONNECTING: 2,
|
||||||
|
});
|
||||||
|
|
||||||
|
const RoomEvent = Object.freeze({
|
||||||
|
ConnectionStateChanged: "connectionStateChanged",
|
||||||
|
Disconnected: "disconnected",
|
||||||
|
ParticipantConnected: "participantConnected",
|
||||||
|
ParticipantDisconnected:"participantDisconnected",
|
||||||
|
});
|
||||||
|
|
||||||
import { logger } from "./Logger.mjs";
|
import { logger } from "./Logger.mjs";
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -94,7 +107,7 @@ function stateLabel(cs) {
|
|||||||
* Events: "disconnect", "error", "autoleave"
|
* Events: "disconnect", "error", "autoleave"
|
||||||
*/
|
*/
|
||||||
export class FluxerVoiceConnection extends EventEmitter {
|
export class FluxerVoiceConnection extends EventEmitter {
|
||||||
/** @type {Room|null} */
|
/** @type {any} LiveKit Room instance from @fluxerjs/voice */
|
||||||
room = null;
|
room = null;
|
||||||
channelId = null;
|
channelId = null;
|
||||||
_voice = null;
|
_voice = null;
|
||||||
|
|||||||
Reference in new issue
Block a user