Skip to content

Instantly share code, notes, and snippets.

@aamiaa
Last active May 4, 2024 18:28
Show Gist options
  • Save aamiaa/204cd9d42013ded9faf646fae7f89fbb to your computer and use it in GitHub Desktop.
Save aamiaa/204cd9d42013ded9faf646fae7f89fbb to your computer and use it in GitHub Desktop.
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Join the same vc on an alt
  4. Stream any window (can be notepad or something)
  5. Press Ctrl+Shift+I to open DevTools
  6. Go to the Console tab
  7. Paste the following code and hit enter:
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);

let ApplicationStreamingStore = Object.values(wpRequire.c).find(x => x?.exports?.default?.getStreamerActiveStreamMetadata).exports.default;
let QuestsStore = Object.values(wpRequire.c).find(x => x?.exports?.default?.getQuest).exports.default;
let FluxDispatcher = Object.values(wpRequire.c).find(x => x?.exports?.default?.flushWaitQueue).exports.default;

let quest = [...QuestsStore.quests.values()].find(x => x.userStatus?.enrolledAt && !x.userStatus?.completedAt && new Date(x.config.expiresAt).getTime() > Date.now())
let isApp = navigator.userAgent.includes("Electron/")
if(!isApp) {
	console.log("This no longer works in browser. Use the desktop app!")
} else if(!quest) {
	console.log("You don't have any uncompleted quests!")
} else {
	let pid = Math.floor(Math.random() * 30000) + 1000
	ApplicationStreamingStore.getStreamerActiveStreamMetadata = () => ({
		id: quest.config.applicationId,
		pid,
		sourceName: null
	})
	
	let secondsNeeded = quest.config.streamDurationRequirementMinutes * 60
	let fn = data => {
		let progress = data.userStatus.streamProgressSeconds
		console.log(`Quest progress: ${progress}/${secondsNeeded}`)
		
		if(progress >= secondsNeeded) {
			console.log("Quest completed!")
			FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
		}
	}
	FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
	
	console.log(`Spoofed your stream to ${quest.config.applicationName}. Stay in vc for ${Math.ceil(quest.config.streamDurationRequirementMinutes - (quest.userStatus?.streamProgressSeconds ?? 0) / 60)} more minutes.`)
	console.log("Remember that you need at least 1 other person to be in the vc!")
}
  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 the Quest progress: prints in the Console tab, or by reopening the Gift Inventory tab in settings. The progress should update every 30s.

FAQ

Q: Ctrl + Shift + I doesn't work

A: Either download the ptb client, or use this to enable DevTools on stable

Q: I get an error saying "Unauthorized"

A: Discord has patched the script from working in browsers. Use the desktop app, or alternatively find some extension which lets you change your User-Agent and append the string Electron/ anywhere in it.

They have also started checking how many people are in the vc, so make sure you join it on at least 1 other account.

Q: I get a different error

A: Make sure you're copy/pasting the script correctly and that you've have done all the steps.

@bee1850
Copy link

bee1850 commented May 3, 2024

4B2CHZFHA2DH

@Craleone
Copy link

Craleone commented May 3, 2024

9T2CHZEHZK29

@pluba
Copy link

pluba commented May 3, 2024

XBKVZYFF3XWD

@h6rd
Copy link

h6rd commented May 3, 2024

YTKUHYEWMQHM

@Kredwi
Copy link

Kredwi commented May 3, 2024

EB2VYGZL3WRR

@34-4
Copy link

34-4 commented May 3, 2024

Just wanted the badge.
Free code: AB3UHGEECAEH

@DataGoblin
Copy link

ATJCYZG5TLBV

@SCsupercraft
Copy link

Here are my two codes, redeem them for free stuff at https://genshin.hoyoverse.com/en/gift
PBJCGHGMX9CR
EAJDGYZJMYBR

@sovietcorrupt
Copy link

QAKCHZZ7ECJD

@k0sy
Copy link

k0sy commented May 3, 2024

code: US2UYZYVPDXD

@sanchaton
Copy link

3T2DYHYSNLQV code

@Starebeodd
Copy link

ANOTHER CODE GANG!!!

@searinminecraft
Copy link

My inbox is literally getting flooded with these crap now :/

@mackenzietorculas
Copy link

Code? :<

@mackenzietorculas
Copy link

Redeem Code:

  1. RERBFT39544D
  2. ULEP3495428K
  3. RTJUNRSHTAL9
  4. CA3BLTURGH9D
  5. GENSHINGIFT

redeem them for free stuff at https://genshin.hoyoverse.com/en/gift

@tehfuturegamerz
Copy link

MSKUYGYW48NV

@aix05
Copy link

aix05 commented May 4, 2024

4AKDHZJLS3V9

@bhanukaurav2
Copy link

its not working on windows

@crypt0x1337
Copy link

thanks for the code , here are my codes as i only wanted the badge

MA3CZZ32X65R
NB3DGYJ8KG3Z
DBKUHGK8438D

@Nycto97
Copy link

Nycto97 commented May 4, 2024

My inbox is literally getting flooded with these crap now :/

Top-right of the page, click Unsubscribe

@DiamondRoPlayz
Copy link

My inbox is literally getting flooded with these crap now :/

Same here, I get spammed emails from here 💀

@Razil131
Copy link

Razil131 commented May 4, 2024

3A2UYG262LD9

@Starebeodd
Copy link

most of the codes aren't even working

@ixires
Copy link

ixires commented May 4, 2024

Захват32323232

@zulnurdiana
Copy link

4TJCZH2VJPT5

@aamiaa
Copy link
Author

aamiaa commented May 4, 2024

Захват32323232

You... translated the code to russian?? That obviously won't work 😭

@NAAKY0
Copy link

NAAKY0 commented May 4, 2024

Was this Patched on browser?

@L3-M
Copy link

L3-M commented May 4, 2024

Was this Patched on browser?

image

@L3-M
Copy link

L3-M commented May 4, 2024

most of the codes aren't even working

you guys know those codes are for Genshin Impact!?
i saw a lot trying to redeem it here
image
if you are here for the badge you need to complete the quest yourself

@L3-M
Copy link

L3-M commented May 4, 2024

here is another one:
LSKCHKK64G3D

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