mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2026-01-11 06:45:42 +00:00
Typescript Continue
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { getVoiceConnection, joinVoiceChannel } from "@discordjs/voice";
|
||||
import { VoiceChannel } from "discord.js";
|
||||
import { Guild, GuildMember, VoiceChannel } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
|
||||
export default class Radio extends Map {
|
||||
@@ -32,13 +32,13 @@ export default class Radio extends Map {
|
||||
restore(client: RadioClient, guilds: any) {
|
||||
if(!client.stations) return;
|
||||
|
||||
guilds.forEach(async (guild: { id: any; }) => {
|
||||
guilds.forEach(async (guild: Guild) => {
|
||||
let state = client.funcs.loadState(client, guild);
|
||||
if(!state) return;
|
||||
if(!state.station || !state.channels.voice || !state.channels.text) return;
|
||||
let voiceChannel = client.channels.cache.get(state.channels.voice);
|
||||
if(!voiceChannel) return;
|
||||
if(voiceChannel.members.filter((member: { user: { bot: any; }; }) => !member.user.bot).size === 0) return;
|
||||
if(!voiceChannel || !(voiceChannel instanceof VoiceChannel)) return;
|
||||
if(voiceChannel.members.filter((member: GuildMember) => !member.user.bot).size === 0) return;
|
||||
|
||||
|
||||
const sstation = await client.stations?.search(state.station.name, "direct");
|
||||
|
||||
Reference in New Issue
Block a user