tywil04 / slavartdl

Simple tool written in Go(lang) to download music using the SlavArt Divolt server
GNU General Public License v3.0
17 stars 1 forks source link

Support discord bot also #10

Closed tywil04 closed 11 months ago

tywil04 commented 1 year ago

I just learned that there is another bot that uses discord that works similarly to the slavart bot, I think its made by the same people.

I would like to support it in the future, although just as a note for future reference it will be more complicated than using the slavart bot because for one, I don't think discord lets you send messages as a regular user using an API (I could be very wrong) and secondly the download link redirects to a few pages which require user input to actually download the zipped contents, which means I cant simply do a http.Get to download it.

I might want to enable the bot and use it as a fallback for the slavart bot or I might want to allow users to change channel ids and what provider they want to use (divolt or discord) so they can choose what bot to use and when. (moving hard coded values into the config thanks to: https://github.com/tywil04/slavartdl/issues/8)

tywil04 commented 11 months ago

I am close to fully supporting using the pixeldrain bot if the divolt bot fails. It will be in the next few updates!

tywil04 commented 11 months ago

The internal library for the discord bot has been commited, soon It will automatically fall back onto the discord bot if the slavart bot is down or if it throws an error.

The discord bot is more likely to go wrong because I need to jump through so many hoops to get the download link at the end. Plus as far as my understanding goes the discord bot has a 5gb download limit, once that limit is passed the download speeds are throttled.

bacon-cheeseburger commented 11 months ago

Has the config file structure changed? How do you set the discord login/password?

tywil04 commented 11 months ago

Has the config file structure changed? How do you set the discord login/password?

As of right now, no. The config hasn't changed because discord support isn't in the cli tool yet. The discord library that I have written to interact with the pixeldrain bot has been commited to the repo though. In the next week or so I will hopeful have it set up so it falls back to the discord bot provided you have a token (discord doesnt allow getting a token using credentials so for now that is unavailable).

Another downside is that the discord client directly goes against the discord TOS which means your account can be banned.

tywil04 commented 11 months ago

Discord support has been added to the command line utility, for now you need to manually select it using the --useDiscord, -D flag or config value.