Commit 4ff13b78 authored by nanahira's avatar nanahira

support challonge roomlist

parent b91340e3
Pipeline #43304 failed with stages
in 95 minutes and 55 seconds
...@@ -2,7 +2,7 @@ import { YGOProCtosJoinGame } from 'ygopro-msg-encode'; ...@@ -2,7 +2,7 @@ import { YGOProCtosJoinGame } from 'ygopro-msg-encode';
import { Context } from '../app'; import { Context } from '../app';
import { Client } from '../client'; import { Client } from '../client';
import { MenuEntry, MenuManager } from '../feats'; import { MenuEntry, MenuManager } from '../feats';
import { RoomManager } from '../room'; import { DuelStage, RoomManager } from '../room';
export class JoinRoomlist { export class JoinRoomlist {
private logger = this.ctx.createLogger(this.constructor.name); private logger = this.ctx.createLogger(this.constructor.name);
...@@ -29,7 +29,12 @@ export class JoinRoomlist { ...@@ -29,7 +29,12 @@ export class JoinRoomlist {
await this.menuManager.launchMenu(client, async () => { await this.menuManager.launchMenu(client, async () => {
const roomNames = this.roomManager const roomNames = this.roomManager
.allRooms() .allRooms()
.filter((room) => room.native && !room.name.includes('$')) .filter(
(room) =>
(room.native ||
(room.duelStage !== DuelStage.Begin && room.challongeInfo)) &&
!room.name.includes('$'),
)
.map((room) => room.name); .map((room) => room.name);
const menu: MenuEntry[] = roomNames.map((roomName) => ({ const menu: MenuEntry[] = roomNames.map((roomName) => ({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment