TheDiscorders / SelfRythm

A music Discord bot that works as a selfbot
MIT License
50 stars 74 forks source link

Youtube search broken #29

Closed PandaKewt closed 3 years ago

PandaKewt commented 3 years ago

Describe the bug Youtube.search boken

To Reproduce Steps to reproduce the behavior: $play [search]

Expected behavior Play Music

Screenshots /home/username/SelfRythm/utils.js:62 YouTube.search(stringOfWords, { limit: 1 }) ^

TypeError: YouTube.search is not a function at /home/username/SelfRythm/utils.js:62:21 at new Promise () at Object.getUrl (/home/username/SelfRythm/utils.js:61:24) at Object.module.exports.run (/home/username/SelfRythm/commands/play.js:24:28) at module.exports (/home/username/SelfRythm/events/message.js:13:13) at Client.emit (node:events:365:28) at MessageCreateAction.handle (/home/username/SelfRythm/node_modules/discord.js-selfbot/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/home/username/SelfRythm/node_modules/discord.js-selfbot/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/home/username/SelfRythm/node_modules/discord.js-selfbot/src/client/websocket/WebSocketManager.js:386:31) at WebSocketShard.onPacket (/home/username/SelfRythm/node_modules/discord.js-selfbot/src/client/websocket/WebSocketShard.js:435:22)

Desktop (please complete the following information):

Additional context You fogot .default at const YouTube = require("youtube-sr"); in utils.js

Firokat commented 3 years ago

In fact, this changed in recent versions of youtube-dl. Going to fix that today. Thanks for feedback

Firokat commented 3 years ago

Issue should be fixed now, it was already fixed on the Docker branch but wasn't merged to main.