stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Discord Webhook Implementation

Open Ju1-js opened this issue 3 years ago • 7 comments

A prototype/proof-of-concept Discord Webhook implementation.

  • It can probably be optimized.
  • A better way to customize the embed should be developed.

There is already a discord bot being developed, this is just a way to automatically update a link in a discord server.

Ju1-js avatar Oct 30 '22 12:10 Ju1-js

This will solve #3296. Thank you for your work!

Reinbowsaur avatar Oct 31 '22 08:10 Reinbowsaur

A way to post the generated image to a webhook could also be beneficial. This could run on the same webhook, but preferably a separate one.

I will look into menu creation and see if I can add the webhook to the settings panel, maybe with some privacy features: ex. When the text box isn’t selected, most of it is censored.

Ju1-js avatar Oct 31 '22 17:10 Ju1-js

This will solve #3296. Thank you for your work!

Currently, this only posts the new link to the public share URL at every launch. I could try modifying it to post the images, do you think that it would be better if it posted on a button click or every single image generated? @Reinbowsaur How do you think that it should work?

Ju1-js avatar Oct 31 '22 22:10 Ju1-js

This will solve #3296. Thank you for your work!

Currently, this only posts the new link to the public share URL at every launch. I could try modifying it to post the images, do you think that it would be better if it posted on a button click or every single image generated? @Reinbowsaur How do you think that it should work?

Ah silly me, I didn't even try it I just assumed it was what I had requested. (Good idea though auto sharing the link to a channel is also very helpful)

As for how it should work, I personally was hoping for something that would post every single image generated! However I imagine per button click might be desirable to others too... say maybe in tandem with the save button?

Reinbowsaur avatar Nov 01 '22 02:11 Reinbowsaur

I will see what I can do, however, there will probably not be an update for the next few days as I have provincial exams coming up. So I won't be able to start developing these features for a few days, probably till Thursday or Friday.

Ju1-js avatar Nov 01 '22 05:11 Ju1-js

I think the discord webhook can be implemented in extensions if my PR #3982 was merged, isn't it?

MaikoTan avatar Nov 01 '22 07:11 MaikoTan

this definitely should be an extension

AUTOMATIC1111 avatar Nov 01 '22 10:11 AUTOMATIC1111

this definitely should be an extension

@MaikoTan, @AUTOMATIC1111 Sorry, but as I just recently learned python to make this, how would I retrieve the public URL from webui.py?

Ju1-js avatar Nov 03 '22 01:11 Ju1-js

@MaikoTan, @AUTOMATIC1111 Sorry, but as I just recently learned python to make this, how would I retrieve the public URL from webui.py?

Do you mean that you want to get the URL like https://<some-magic-words>.gradio.app/? If true, you can follow my comment here to create your own extension. And then, as the argument demo is an instance of gradio.Blocks, so the URL like above would be demo.share_url.

MaikoTan avatar Nov 03 '22 03:11 MaikoTan

I think I can write a simple explaination of it in the wiki, but I don't know how to contribute to wiki.

MaikoTan avatar Nov 03 '22 03:11 MaikoTan

I don't think that you can submit PRs for the wiki... You could try creating an issue with the changes you are suggesting.

Ju1-js avatar Nov 03 '22 05:11 Ju1-js

@MaikoTan Sorry, but you seem quite knowledgeable about Gradio. I'm struggling pushing the new HTML from one of my functions to the output gr.HTML. Do you have any ideas on why it isn't working? My repo can be found here.

Ju1-js avatar Nov 07 '22 03:11 Ju1-js

@MaikoTan Sorry, but you seem quite knowledgeable about Gradio. I'm struggling pushing the new HTML from one of my functions to the output gr.HTML. Do you have any ideas on why it isn't working? My repo can be found here.

I am web front-end developer and haven't touched gradio until using this repo. So actually I am far from "quite knowledgeable" about gradio. 🤣 Maybe there are documentations in gradio's site or something? I don't know, sorry!

MaikoTan avatar Nov 07 '22 03:11 MaikoTan

Thanks 🤣

Ju1-js avatar Nov 07 '22 03:11 Ju1-js