mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 05:00:18 +00:00
Update restoreRadios function
This commit is contained in:
parent
1533ae46a4
commit
05905e6e6d
@ -1,6 +1,5 @@
|
|||||||
import Discord from "discord.js";
|
import Discord from "discord.js";
|
||||||
const {
|
const {
|
||||||
createAudioPlayer,
|
|
||||||
getVoiceConnection,
|
getVoiceConnection,
|
||||||
joinVoiceChannel
|
joinVoiceChannel
|
||||||
} = require("@discordjs/voice");
|
} = require("@discordjs/voice");
|
||||||
@ -26,7 +25,6 @@ module.exports = async function restoreRadios(client, guilds) {
|
|||||||
voiceChannel: client.channels.cache.get(state.channels.voice),
|
voiceChannel: client.channels.cache.get(state.channels.voice),
|
||||||
connection: null,
|
connection: null,
|
||||||
message: null,
|
message: null,
|
||||||
audioPlayer: createAudioPlayer(),
|
|
||||||
station: station
|
station: station
|
||||||
};
|
};
|
||||||
client.radio.set(guild.id, construct);
|
client.radio.set(guild.id, construct);
|
||||||
@ -44,7 +42,7 @@ module.exports = async function restoreRadios(client, guilds) {
|
|||||||
let date = new Date();
|
let date = new Date();
|
||||||
construct.startTime = date.getTime();
|
construct.startTime = date.getTime();
|
||||||
|
|
||||||
client.funcs.play(null, guild, client, url, Discord);
|
client.funcs.play(client, null, guild, station);
|
||||||
|
|
||||||
client.datastore.checkEntry(guild.id);
|
client.datastore.checkEntry(guild.id);
|
||||||
construct.datastore = client.datastore.getEntry(guild.id);
|
construct.datastore = client.datastore.getEntry(guild.id);
|
||||||
|
Loading…
Reference in New Issue
Block a user