Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

    • Star(0)You must be signed in to star a gist
    • Fork(0)You must be signed in to fork a gist

    Select an option

    Save inaciomaio/8ff21a72b6a72f96314252ad5d5e7434 to your computer and use it in GitHub Desktop.
    Complete Recent Discord Quest

    How to use this script:

    1. Accept the quest under User Settings -> Gift Inventory
    2. Join a vc
    3. Stream any window (can be notepad or something)
    4. PressCtrl+Shift+I to open DevTools
    5. Go to theConsole tab
    6. Paste the following code and hit enter:
    letwpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},(req)=>{wpRequire=req;}]);letapi=Object.values(wpRequire.c).find(x=>x?.exports?.getAPIBaseURL).exports.HTTP;letApplicationStreamingStore=Object.values(wpRequire.c).find(x=>x?.exports?.default?.getStreamerActiveStreamMetadata).exports.default;letQuestsStore=Object.values(wpRequire.c).find(x=>x?.exports?.default?.getQuest).exports.default;letencodeStreamKey=Object.values(wpRequire.c).find(x=>x?.exports?.encodeStreamKey).exports.encodeStreamKey;letsleep=ms=>newPromise(resolve=>setTimeout(resolve,ms));letquest=[...QuestsStore.quests.values()].find(x=>x.userStatus?.enrolledAt&&!x.userStatus?.completedAt)if(!quest){console.log("You don't have any uncompleted quests!")}else{letstreamId=encodeStreamKey(ApplicationStreamingStore.getCurrentUserActiveStream())letsecondsNeeded=quest.config.streamDurationRequirementMinutes*60letheartbeat=asyncfunction(){console.log("Completing quest",quest.config.messages.gameTitle,"-",quest.config.messages.questName)while(true){letres=awaitapi.post({url:`/quests/${quest.id}/heartbeat`,body:{stream_key:streamId}})letprogress=res.body.stream_progress_secondsconsole.log(`Quest progress:${progress}/${secondsNeeded}`)if(progress>=secondsNeeded)break;awaitsleep(30*1000)}console.log("Quest completed!")}heartbeat()}
    1. Keep the stream running for 15 minutes
    2. You can now claim the reward in User Settings -> Gift Inventory!

    You can track the progress by looking at theQuest progress: prints in the Console tab, or by reopening the Gift Inventory tab in settings. The progress should update every 30s.

    You do NOT need anybody watching your stream for this to work. You can be alone in vc just fine.

    Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

    [8]ページ先頭

    ©2009-2025 Movatter.jp