Seek command not working due to ytdl-core issue
This commit is contained in:
parent
8f9adf2e1b
commit
b492c8d478
@ -1,6 +1,6 @@
|
|||||||
# DENIM 3001 
|
# DENIM 3001 
|
||||||
|
|
||||||
[](https://www.codefactor.io/repository/github/histmy/denim-bot)
|
[](https://www.codefactor.io/repository/github/histmy/denim-mirror)
|
||||||
|
|
||||||
## First setup
|
## First setup
|
||||||
1. Install all packages with the command `npm i`
|
1. Install all packages with the command `npm i`
|
||||||
|
|||||||
@ -20,7 +20,7 @@ const guildy = new Map<string, { kju: QueueItem[]; loop: boolean; }>();
|
|||||||
|
|
||||||
const searchScema = array(record(string(), string()));
|
const searchScema = array(record(string(), string()));
|
||||||
|
|
||||||
async function playNext(guildId: string, seek?: number) {
|
async function playNext(guildId: string) {
|
||||||
try {
|
try {
|
||||||
const guilda = guildy.get(guildId)!;
|
const guilda = guildy.get(guildId)!;
|
||||||
const kju = guilda.kju;
|
const kju = guilda.kju;
|
||||||
@ -162,20 +162,7 @@ const exp: Modul = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
seek: {
|
seek: "nu tuto us nefunkuje pac ytdl-core je kokotina",
|
||||||
DMUnsafe: true,
|
|
||||||
arg: "na kolikátou sekundu přetočit",
|
|
||||||
run: (mes, arg) => {
|
|
||||||
const numero = Number(arg);
|
|
||||||
if (isNaN(numero)) return "huh?";
|
|
||||||
|
|
||||||
const kju = guildy.get(mes.guildId!)?.kju;
|
|
||||||
if (!kju?.length) return "nehraje nic";
|
|
||||||
|
|
||||||
playNext(mes.guildId!, numero);
|
|
||||||
mes.react(emouty.d3k);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
loop: {
|
loop: {
|
||||||
DMUnsafe: true,
|
DMUnsafe: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user