Last active
          May 12, 2021 19:15 
        
      - 
      
 - 
        
Save DearTanakorn/1dab0b6e6ad13112243ec4178f35b7e4 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
DearTanakorn revised this gist
May 12, 2021 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,21 @@ var token = ""; var channel_id = ""; var activities_id = ""; /* Youtube = 755600276941176913 Poker Night = 755827207812677713 Betrayal.io = 773336526917861400 Fishington.io = 814288819477020702 */ var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); myHeaders.append("Authorization", token); var raw = JSON.stringify({ "max_age": 86400, "max_uses": 0, "target_application_id": activities_id, "target_type": 2, "temporary": false });  - 
        
DearTanakorn created this gist
May 12, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ var token = ""; var channel_id = ""; var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); myHeaders.append("Authorization", token); var raw = JSON.stringify({ "max_age": 86400, "max_uses": 0, "target_application_id": "755600276941176913", "target_type": 2, "temporary": false }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch(`https://discord.com/api/v8/channels/${channel_id}/invites`, requestOptions) .then(response => response.json()) .then(result => console.log(`https://discord.gg/${result.code}`)) .catch(error => console.log('error', error));