Jump to content
CraZyNes

discord send photo

Recommended Posts

hello

i am stuck with some bot that i am building i want to take screen shot off some notifiction that i have on my computer and send it to discord 

i all ready succed to open a bot on discord and send massege from auto it but cant find how to send photo and when i take screen shot it stack on 

the autoit screen and not the desktop thank you fot helping

 

Share this post


Link to post
Share on other sites

post your code

and please give us some detailed information where the problem exactly is

Edited by Aelc

why do i get garbage when i buy garbage bags? <_<

Share this post


Link to post
Share on other sites

#include <ScreenCapture.au3>


    _ScreenCapture_Capture(@MyDocumentsDir & "\Screen.jpg", 75, 291, 535, 704)


Webhook("Hello")

Func Webhook($Message)
    Local $Url = "https://discord.com/api/webhooks/123
    Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    Local $Packet = '{"content": "' & $Message & '"}'
    $oHTTP.open('POST',$Url)
    $oHTTP.setRequestHeader("Content-Type","application/json")
    $oHTTP.send($Packet)

 Endfunc

 

i dont how to connect the file of screenshot to the webhook and send it to the discord

5 minutes ago, Aelc said:

post your code

and please give us some detailed information where the problem exactly is

 

Share this post


Link to post
Share on other sites
1 hour ago, CraZyNes said:

#include <ScreenCapture.au3>


    _ScreenCapture_Capture(@MyDocumentsDir & "\Screen.jpg", 75, 291, 535, 704)


Webhook("Hello")

Func Webhook($Message)
    Local $Url = "https://discord.com/api/webhooks/123
    Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    Local $Packet = '{"content": "' & $Message & '"}'
    $oHTTP.open('POST',$Url)
    $oHTTP.setRequestHeader("Content-Type","application/json")
    $oHTTP.send($Packet)

 Endfunc

 

i dont how to connect the file of screenshot to the webhook and send it to the discord

 

please use the code tag next time when you post code...

first of all you can't even run this script because you missed a " in your URL

second you trying to access an unauthorized website

link.thumb.png.830e0015f5ed9a7639f99c9b814c2a49.png

 

so you will need an authentication to access it

and 3rd point: where do you set up your send request with your screencapture? you will need to link it before send...

Regards

Edited by Aelc
3rd point

why do i get garbage when i buy garbage bags? <_<

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...