better voice pt2
This commit is contained in:
parent
e506567064
commit
3da87ed42e
@ -5,14 +5,17 @@ import { Client } from "discord.js";
|
||||
import { search, soundcloud, stream, validate, video_basic_info } from "play-dl";
|
||||
import { emouty } from "../utils/emotes";
|
||||
import { Modul, SRecord } from "../utils/types";
|
||||
import { adminLog, configureTimeAnouncment, getCurrentPlayer, joinVoice, play } from "../utils/utils";
|
||||
import { adminLog, configureTimeAnouncment, getCurrentPlayer, joinVoice, log, play } from "../utils/utils";
|
||||
|
||||
const kjus: SRecord<{ name: string; url: string; }[]> = {};
|
||||
|
||||
async function zahrat(conn: VoiceConnection, url: string, seek?: number) {
|
||||
try {
|
||||
const src = await stream(url, { seek });
|
||||
play(conn, { name: src.stream, volume: 1, type: src.type });
|
||||
play(conn, { name: src.stream, volume: 1, type: src.type })
|
||||
.catch(e => {
|
||||
log("chyba v muziki", e);
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
const client: Client = module.exports.client;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user