Skip to content

Instantly share code, notes, and snippets.

@aamiaa
Last active July 16, 2024 00:24
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!

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

Warning

There are now two quest types ("stream" and "play")! Pay attention to the instructions!

How to use this script:

  1. Accept a quest under User Settings -> Gift Inventory
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
Click to expand
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);

let ApplicationStreamingStore, RunningGameStore, QuestsStore, ExperimentStore, FluxDispatcher, api
if(window.GLOBAL_ENV.SENTRY_TAGS.buildId === "366c746173a6ca0a801e9f4a4d7b6745e6de45d4") {
	ApplicationStreamingStore = Object.values(wpRequire.c).find(x => x?.exports?.default?.getStreamerActiveStreamMetadata).exports.default;
	RunningGameStore = Object.values(wpRequire.c).find(x => x?.exports?.default?.getRunningGames).exports.default;
	QuestsStore = Object.values(wpRequire.c).find(x => x?.exports?.default?.getQuest).exports.default;
	ExperimentStore = Object.values(wpRequire.c).find(x => x?.exports?.default?.getGuildExperiments).exports.default;
	FluxDispatcher = Object.values(wpRequire.c).find(x => x?.exports?.default?.flushWaitQueue).exports.default;
	api = Object.values(wpRequire.c).find(x => x?.exports?.getAPIBaseURL).exports.HTTP;
} else {
	ApplicationStreamingStore = Object.values(wpRequire.c).find(x => x?.exports?.Z?.getStreamerActiveStreamMetadata).exports.Z;
	RunningGameStore = Object.values(wpRequire.c).find(x => x?.exports?.ZP?.getRunningGames).exports.ZP;
	QuestsStore = Object.values(wpRequire.c).find(x => x?.exports?.Z?.getQuest).exports.Z;
	ExperimentStore = Object.values(wpRequire.c).find(x => x?.exports?.Z?.getGuildExperiments).exports.Z;
	FluxDispatcher = Object.values(wpRequire.c).find(x => x?.exports?.Z?.flushWaitQueue).exports.Z;
	api = Object.values(wpRequire.c).find(x => x?.exports?.tn?.get).exports.tn;
}

let quest = [...QuestsStore.quests.values()].find(x => x.id !== "1245082221874774016" && 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 {
	const pid = Math.floor(Math.random() * 30000) + 1000
	
	let applicationId, applicationName, secondsNeeded, secondsDone, canPlay
	if(quest.config.configVersion === 1) {
		applicationId = quest.config.applicationId
		applicationName = quest.config.applicationName
		secondsNeeded = quest.config.streamDurationRequirementMinutes * 60
		secondsDone = quest.userStatus?.streamProgressSeconds ?? 0
		canPlay = quest.config.variants.includes(2)
	} else if(quest.config.configVersion === 2) {
		applicationId = quest.config.application.id
		applicationName = quest.config.application.name
		canPlay = ExperimentStore.getUserExperimentBucket("2024-04_quest_playtime_task") > 0 && quest.config.taskConfig.tasks["PLAY_ON_DESKTOP"]
		const taskName = canPlay ? "PLAY_ON_DESKTOP" : "STREAM_ON_DESKTOP"
		secondsNeeded = quest.config.taskConfig.tasks[taskName].target
		secondsDone = quest.userStatus?.progress?.[taskName]?.value ?? 0
	}

	if(canPlay) {
		api.get({url: `/applications/public?application_ids=${applicationId}`}).then(res => {
			const appData = res.body[0]
			const exeName = appData.executables.find(x => x.os === "win32").name.replace(">","")
			
			const games = RunningGameStore.getRunningGames()
			const fakeGame = {
				cmdLine: `C:\\Program Files\\${appData.name}\\${exeName}`,
				exeName,
				exePath: `c:/program files/${appData.name.toLowerCase()}/${exeName}`,
				hidden: false,
				isLauncher: false,
				id: applicationId,
				name: appData.name,
				pid: pid,
				pidPath: [pid],
				processName: appData.name,
				start: Date.now(),
			}
			games.push(fakeGame)
			FluxDispatcher.dispatch({type: "RUNNING_GAMES_CHANGE", removed: [], added: [fakeGame], games: games})
			
			let fn = data => {
				let progress = quest.config.configVersion === 1 ? data.userStatus.streamProgressSeconds : Math.floor(data.userStatus.progress.PLAY_ON_DESKTOP.value)
				console.log(`Quest progress: ${progress}/${secondsNeeded}`)
				
				if(progress >= secondsNeeded) {
					console.log("Quest completed!")
					
					const idx = games.indexOf(fakeGame)
					if(idx > -1) {
						games.splice(idx, 1)
						FluxDispatcher.dispatch({type: "RUNNING_GAMES_CHANGE", removed: [fakeGame], added: [], games: []})
					}
					FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
				}
			}
			FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
			
			console.log(`Spoofed your game to ${applicationName}. Wait for ${Math.ceil((secondsNeeded - secondsDone) / 60)} more minutes.`)
		})
	} else {
		let realFunc = ApplicationStreamingStore.getStreamerActiveStreamMetadata
		ApplicationStreamingStore.getStreamerActiveStreamMetadata = () => ({
			id: applicationId,
			pid,
			sourceName: null
		})
		
		let fn = data => {
			let progress = quest.config.configVersion === 1 ? data.userStatus.streamProgressSeconds : Math.floor(data.userStatus.progress.STREAM_ON_DESKTOP.value)
			console.log(`Quest progress: ${progress}/${secondsNeeded}`)
			
			if(progress >= secondsNeeded) {
				console.log("Quest completed!")
				
				ApplicationStreamingStore.getStreamerActiveStreamMetadata = realFunc
				FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
			}
		}
		FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
		
		console.log(`Spoofed your stream to ${applicationName}. Stream any window in vc for ${Math.ceil((secondsNeeded - secondsDone) / 60)} more minutes.`)
		console.log("Remember that you need at least 1 other person to be in the vc!")
	}
}
  1. Follow the printed instructions depending on what type of quest you have
    • If your quest says to "play" the game, you can just wait and do nothing
    • If your quest says to "stream" the game, join a vc with a friend or alt and stream any window
  2. Wait for 15 minutes
  3. 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.

Completing The Console Quest

While the script doesn't work on it, it is possible to complete the "play any game on your console" quest without owning a console by using Xbox's Cloud Gaming:

  1. Connect your Xbox (aka Microsoft) account to Discord (Settings -> Connections)
  2. Go to https://xbox.com/play and login via the same Xbox account
  3. Launch a free game (such as Fortnite)
  4. Leave it running for 10 minutes

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.

@ziad0153
Copy link

صورة

يمكنك ان تكتب

@MeIsGaming
Copy link

Gaming console script?

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

This should 100% be added to this gist, worked from germany without vpn. Thank you for your help!

@bot910
Copy link

bot910 commented Jun 29, 2024

how do i run it in desktop app?
there is no devtools console there?

@bot910
Copy link

bot910 commented Jun 29, 2024

Gaming console script?

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

this didnt work for me, the fortnite quest never register i was playing, i connected with same account

@bot910
Copy link

bot910 commented Jun 29, 2024

can anyone help me

@MeIsGaming
Copy link

how do i run it in desktop app? there is no devtools console there?

look in FAQ

FAQ
Q: Ctrl + Shift + I doesn't work

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

@Onur-Vatansever
Copy link

how do i run it in desktop app? there is no devtools console there?

use discord ptb.

@RISHAB-CREATOR
Copy link

Gaming console script?

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

this didnt work for me, the fortnite quest never register i was playing, i connected with same account

DUDE IT IS FOR CONSOLE QUEST NOT FORTNITE ONE

@Skwipo
Copy link

Skwipo commented Jun 29, 2024

anyone got a console script for pc ? i dont have a console

@MeIsGaming
Copy link

anyone got a console script for pc ? i dont have a console

brother by god scroll up a few comments, and look at @RISHAB-CREATOR s response

@Skwipo
Copy link

Skwipo commented Jun 29, 2024

anyone got a console script for pc ? i dont have a console

brother by god scroll up a few comments, and look at @RISHAB-CREATOR s response

instructions unclear im now locked up in prison send lawyer

@Skwipo
Copy link

Skwipo commented Jun 29, 2024

Gaming console script?

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

works ty

@RISHAB-CREATOR
Copy link

RISHAB-CREATOR commented Jun 29, 2024

anyone got a console script for pc ? i dont have a console

brother by god scroll up a few comments, and look at @RISHAB-CREATOR s response

instructions unclear im now locked up in prison send lawyer

us dude, even i somehow ended up making uranium bomb (little boy)

@fgr178707
Copy link

有人有 PC 的控制台脚本吗?我没有控制台

https://gist.github.com/aamiaa/204cd9d42013ded9faf646fae7f89fbb#faq

@techie-chad
Copy link

This worked Great!
Thank you very much <3

@mahin12-ngl
Copy link

How do i finish the Console Quest???

i already have the Crown...

@RISHAB-CREATOR
Copy link

RISHAB-CREATOR commented Jun 30, 2024

How do i finish the Console Quest???

i already have the Crown...

its ez asf dude, create a microsoft account
link it with xbox , then link it with discord too
after this if not in unitedstates, then use a vpn for it
then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2
its free game,btw login here with the same account
wait for 10mins
NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

@ningno
Copy link

ningno commented Jun 30, 2024

Gaming console script?

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

thx it works

@xunchann
Copy link

xunchann commented Jul 2, 2024

where is the code?

@lomexicano
Copy link

where is the code?

@xunchann right below step 4 there is a "click to expand" button

@lajawi
Copy link

lajawi commented Jul 2, 2024

Does this work with quests that require you to play on a console?

@MeIsGaming
Copy link

Does this work with quests that require you to play on a console?

Why dont you just scroll up 4 comments and use the solution given there, which has been repeated the 100th time now here?

@RuriYoshinova
Copy link

RuriYoshinova commented Jul 3, 2024

can yall shut the fuck up. github should start banning kids in their platform, it's being infested.

@wolfieboy09
Copy link

image
How would this work?

@Tr0llie
Copy link

Tr0llie commented Jul 3, 2024

i was just wondering if the console playing discord thingy works on linux, i know most people use windows but i use linux and idk if i have a spare windows computer

@Tr0llie
Copy link

Tr0llie commented Jul 3, 2024

image How would this work?

If u were to back read, you would know.
anyway heres the link
https://gist.github.com/aamiaa/204cd9d42013ded9faf646fae7f89fbb?permalink_comment_id=5106629#gistcomment-5106629

@MeIsGaming
Copy link

i was just wondering if the console playing discord thingy works on linux, i know most people use windows but i use linux and idk if i have a spare windows computer

It should, if you try it, let me know!

@Twelffth
Copy link

Twelffth commented Jul 3, 2024

Can someone give me a vpn to use?

@baonguyenhaquoc
Copy link

How do i finish the Console Quest???
i already have the Crown...

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

Thanks, it works very well
image

@aamiaa
Copy link
Author

aamiaa commented Jul 3, 2024

I've updated the gist with a tutorial on how to do the console quest. Thanks to everyone who found it in the comments!

@Wasim161298
Copy link

Can someone give me a vpn to use?

yea men plz someone give a vpn this would be very thankfull

@PrototypeGR
Copy link

PrototypeGR commented Jul 3, 2024

How do i finish the Console Quest???
i already have the Crown...

its ez asf dude, create a microsoft account link it with xbox , then link it with discord too after this if not in unitedstates, then use a vpn for it then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2 its free game,btw login here with the same account wait for 10mins NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

Do this^, download Urban VPN proxy addon for Firefox or Chrome, choose United States and it will start working

@lazuee
Copy link

lazuee commented Jul 4, 2024

Console Quest

@2xuhd
Copy link

2xuhd commented Jul 4, 2024

thanks ez complete 2 mission

@itsmechinmoy
Copy link

thanks ez complete 2 mission

it showed cant do it in browser even though i was using the stable desktop app

@SagiriHimoto
Copy link

SagiriHimoto commented Jul 4, 2024

what if I'm using the worst laptop ever and don't have spare 90gb on my drive

image
EDIT:
You don't have to install anything. Use cloud gaming.

@PSYCHO1512
Copy link

The script is working for play Fortnite reload for 15 minutes quest also

@VortexCombat
Copy link

Can someone give me a vpn to use?

Bright VPN

@Tr0llie
Copy link

Tr0llie commented Jul 4, 2024

i was just wondering if the console playing discord thingy works on linux, i know most people use windows but i use linux and idk if i have a spare windows computer

It should, if you try it, let me know!

idk if u noticed but xbox is not supported on linux

@covyu
Copy link

covyu commented Jul 4, 2024

How to complete a quest on Discord without an Xbox. I made a video about it, you can watch it.
https://youtu.be/u89Bx_fobuI

@TechySkills
Copy link

Console Quest

Can I play minecraft bedrock instead of fortnite?

@covyu
Copy link

covyu commented Jul 5, 2024 via email

@Authtbh
Copy link

Authtbh commented Jul 5, 2024

Also guys you need a extension called keybord & mouse for xbox to click things

@i-likegithub
Copy link

i was just wondering if the console playing discord thingy works on linux, i know most people use windows but i use linux and idk if i have a spare windows computer

It should, if you try it, let me know!

idk if u noticed but xbox is not supported on linux

True. But for those who use Linux with the Play console for 10 minutes Quest, RISHAB-CREATOR's instructions do still work regardless if you use Linux. As long as you have an Xbox account connected to your discord it should be good to go—I used my phone instead since I don't like using a VPN on my computer:

its ez asf dude, create a microsoft account
link it with xbox , then link it with discord too
after this if not in unitedstates, then use a vpn for it
then just play this : https://www.xbox.com/en-us/play/games/bt5p2x999vh2
its free game,btw login here with the same account
wait for 10mins
NOTE : IF YOU ARE ON PC, ALL STEPS WOULD WORK, BUT IF U ON MOBILE JUST CHANGE THE VIEW TO DESKTOP WHILE VISITING THE XBOX PLAY LINK

I use Arch btw.

@IshtiakHossain
Copy link

IshtiakHossain commented Jul 8, 2024

The script worked and the console quest also worked with the xbox cloud gaming beta method. the console quest wasn't detecting games because my xbox account was in offline mode so when I got online discord started recognizing games and started counting.

@cxb190007
Copy link

cxb190007 commented Jul 8, 2024

ZENLESS ZONE ZERO - great game btw ;)
XBNUVB2PSJ39

@amryk2012
Copy link

ZENLESS ZONE ZERO
8T7UUAU86639

@amindhaw
Copy link

amindhaw commented Jul 9, 2024

ZENLESS ZONE ZERO
DBPDUUNQF3J5

@Pearl8520
Copy link

DBPDUUNQF3J5

tyty

@TomerGamerTV
Copy link

Im trying the script with the zzz quest but it doesn't seem to work..... tried relaunching the stream multiple times and rejoining

@Trojan-V
Copy link

Trojan-V commented Jul 9, 2024

ZENLESS ZONE ZERO
8SNUDCG2F2U5

@louiszn
Copy link

louiszn commented Jul 9, 2024

will it work when i play minecraft java edition? I'm currently on Linux rn

@sametaor
Copy link

will it work when i play minecraft java edition? I'm currently on Linux rn

Yes, Minecraft Java works, I myself completed it by streaming Minecraft 1.12.2

@Jojo24908
Copy link

ZZZ code: KBPVCFNLVXT9

@ilia-21
Copy link

ilia-21 commented Jul 10, 2024

More ZZZ Codes:
KANURBT5MQ8D
USNC9SB4499R
4BPDRBT459RH
NS6U9TTLM6AV
XTNDQAS44985
CATCHABOO

All working as of 2024/07/10 6PM UTC+3 on Europe Region

@VihaanVPGaming
Copy link

ZZZ Code: ZAPVDE5QGH9R
(Pls feel free to claim, I ain't gonna use it)

@User-Loading
Copy link

ZZZ Code :
HBNCUFM9NU7M

@TechySkills
Copy link

ZZZ Code (which i will never use cuz i dont play)
6ANVDEMKSABR

@EvySesta
Copy link

ZZZ CODE ( I don't play that game )

WT7VUSLAKZ4Z

@BarievArtem
Copy link

Zenless Zone Zero : 8BNDS7NVG84D

@SkyGodCheesey
Copy link

ZZZ Code: SANDB6PQZCTR

@Cleboost
Copy link

ZZZ code : TA6CS6PR5HB9

@MahmoudAli96505
Copy link

2 ZZZ Codes:

SB7VT75NBP7H

4B6CA74NA6H9

@ioniaer
Copy link

ioniaer commented Jul 11, 2024

free zzz code VS6US746MAG9

@playgamesgo
Copy link

ZENLESS ZONE ZERO
PA6VTKQ8STJV

@Perationale
Copy link

ZENLESS ZONE ZERO: XSNCVUAG9A89

@wissxi
Copy link

wissxi commented Jul 13, 2024

ZENLESS ZONE ZERO: EBNCSDBQVCEH

@Tr0llie
Copy link

Tr0llie commented Jul 14, 2024

zzz = ZA6CT7CZJK3R

@ColynOrg
Copy link

5APVB3PK3ZJR

@Kanoes2007
Copy link

GS6CTPV277V9
zonelesszero

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