How to add copy button to Discord Webhook embed message

Viewed 921

enter image description here

In the image above, you can see the text with in blue color and the copy button.

I want to create the same thing, but don't know how to do it.

Does anyone know how to do it?

2 Answers

I just checked by joining the discord you sent. And the copy icon is just a simple icon with no use.

You can't at the moment make a "copy to clipboard" action using any sort of text inside an embed. (It was already suggested a while ago here) Maybe Discord will add this feature someday.

If you just need to copy the exact same thing, they are doing something like:

[click me](https://google.com) 

Discord has not added this functionality yet. The icon there is likely just a small image.. However, you can use an external library called pyperclip. Then, run the following code with an interaction.(interactions are discord 2.0 stuff but are pretty stable in my opinion) import pyperclip pyperclip.copy('The text to be copied to the clipboard.')

Related