SpaceManiac / discord-rs

Rust library for the Discord chat client API
MIT License
387 stars 94 forks source link

Dj bot: Json error #156

Closed marco-bor closed 6 years ago

marco-bor commented 6 years ago

I made a simple project with the premade dj bot.

The bot starts normally but, once i write !dj <my_url>, an error occurs:

[Warning] Json(ErrorImpl { code: Message("invalid type: string \"391369516862406656\", expected a u64 or parseable string"), line: 1, column: 163 })

Any idea on how to fix?

marco-bor commented 6 years ago

Ok maybe the same as issue 140 but I need to check, yet

marco-bor commented 6 years ago

Ok I found the problem in the console, but not sure why it's not working.

Fail

$ youtube-dl -f webm[abr>0]/bestaudio/best --no-playlist --print-json --skip-download https://www.youtube.com/watch?v=SYcmf6TKOFE
bash: 0]/bestaudio/best: No such file or directory

Ok

$ youtube-dl -f "webm[abr>0]/bestaudio/best" --no-playlist --print-json --skip-download https://www.youtube.com/watch?v=SYcmf6TKOFE
WARNING: unable to extract uploader nickname
{"upload_date": null, "protocol": "https", "c...
SpaceManiac commented 6 years ago

The json error is a duplicate of #155, the rest is just a matter of needing to quote the ">" properly and make sure your youtube-dl is up to date.