| 61 | } |
| 62 | |
| 63 | public async makeResource(): Promise<AudioResource<Song> | void> { |
| 64 | let playStream; |
| 65 | |
| 66 | const source = this.url.includes("youtube") ? "youtube" : "soundcloud"; |
| 67 | |
| 68 | if (source === "youtube") { |
| 69 | playStream = await stream(this.url); |
| 70 | } |
| 71 | |
| 72 | if (!stream) return; |
| 73 | |
| 74 | return createAudioResource(playStream.stream, { metadata: this, inputType: playStream.type, inlineVolume: true }); |
| 75 | } |
| 76 | |
| 77 | public startMessage() { |
| 78 | return i18n.__mf("play.startedPlaying", { title: this.title, url: this.url }); |