AmericanPresidentJimmyCarter / yasd-discord-bot

Yet Another Stable Diffusion Discord Bot
MIT License
112 stars 15 forks source link

Add support for upload on slash commands #55

Open Kadah opened 2 years ago

Kadah commented 2 years ago

Discord API added an attachment option type for slash commands earlier this year and several python Discord libraries added support back in February (been using Pycord for my bots). It doesn't seem Discord.py has added it yet.

AmericanPresidentJimmyCarter commented 2 years ago

Okay, it's still accessible through >image2image. As the other slash endpoint is for URLs (/image2image) I'm not sure this will be a priority to fix, or what I would call the third command right now.

Kadah commented 2 years ago

Mostly just wanted to point out that the API functionality is there. Isn't really worth the effort to change to another Discord lib for the one thing.

As far as the command name, it would be nice if the Discord API supported more advanced param requirements, ie: prompt AND (url OR attachment). Could make url and attachment params both optional with an ephemeral error to tell the user to use one of them and RTFM.