manueljlz / gcphone

Telephone for FiveM by ElBichop
88 stars 115 forks source link

Sending photo by message is functional #179

Open Slewog opened 3 years ago

Slewog commented 3 years ago

Hello,

just a little post to warn you that with a friend we have to find a solution so that the photos by messages are functional with screenshot-basic and a webhookdiscord

Replace this:

exports['screenshot-basic']:requestScreenshotUpload(data.url, data.field, function(data)
        local resp = json.decode(data)
        DestroyMobilePhone()
        CellCamActivate(false, false)
        cb(json.encode({ url = resp.files[1].url }))
end)

with:

exports['screenshot-basic']:requestScreenshotUpload("YOUR Discord Webhook URL", "files[]", function(data)
        local image = json.decode(data)
        DestroyMobilePhone()
        CellCamActivate(false, false)
        cb(json.encode({ url = image.attachments[1].proxy_url }))
end)

You need just a discord channel to post the image Capture

Slewog commented 3 years ago

But send an URL with Twitter isn't working, Have you a solution for that ?

The discord weebhook is setting, tweet only with text is working but no with just an URL

kushc0de commented 3 years ago

But send an URL with Twitter isn't working, Have you a solution for that ?

The discord weebhook is setting, tweet only with text is working but no with just an URL

you got solution?

Slewog commented 3 years ago

Yes I have but I don't remember how I have do that x)