Screenshot-Basic

Hello, I’ve been recently looking how to make a resource like the following:
When a user does /screenshot it sends a screenshot to a discord webhook in an embed message, I understand how to send a screenshot to discord but wondering how to post one into an embed message etc.

bump! Still looking for assistance on this.

I can write code for you that will send screenshot on one channel and then send screenshot in embed message to the another channel. If this solution is okay for you, then I can write it tomorrow :wink:

That would be amazing, thank you so much!

I was writing this code kinda fast so let me know does it work :smiley:

Client-side

exports["screenshot-basic"]:requestScreenshotUpload("your_private_webhook_here", "files[]", function(data)
	TriggerServerEvent("custom_event_name", json.decode(data).attachments[1].proxy_url)
end)

Server-side

RegisterServerEvent("custom_event_name", function(img)
	if img then
		local embeds = {
            {
                ["title"] = "Example title",
                ["color"] = 16777215,
                ["image"] = {
                	["url"] = img
                }
            }
        }
        PerformHttpRequest("webhook_for_your_embedded_message_here", function(...)end, "POST", json.encode({embeds = embeds}), {["Content-Type"]="application/json"})
	end
end)

Hey, is there a possibility to make the client side bit server-Side?

Well it is possible but kinda hard. I think that it is better to do screenshots on client side and then send link to server side