Ask coding questions

← Back to all posts
Discord bot error with Replit DB
yash1441 (0)
db.get( => {
			if (value == null) message.reply("Please use !setid *<your game id>* to set your Game ID first.");
			else message.reply("Your Game ID is **" + value + "**");

This piece of code had been working fine for an year now but suddenly started giving the error as follows out of the blue.

(node:14079) UnhandledPromiseRejectionWarning: SyntaxError: Failed to parse value of 132784173311197184, try passing a raw option to get the raw value

I tried entering raw key to db.get instead of but it had the same error. Can anyone guide me as to why is the value of that key not getting parsed? I already tried many more of the keys and no value gets parsed.

yash1441 (0)

Seems like the database URL changes every month for security purposes. So if I want to use it externally then I have to regenerate it once every month.


What DB are you using?


@yash1441 do you have a parser?

yash1441 (0)

@novaflippers In the code of @replit/database it parses it inside the .get function itself.