Skip to content
← Back to Community
Discord bot error with Replit DB
Profile icon
hacker
has Hacker Plan
yash1441
db.get(message.author.id).then(value => { 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 message.author.id 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.

Voters
Profile icon
opplayz
Profile icon
yash1441
Comments
hotnewtop
Profile icon
yash1441

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.

Profile icon
[deleted]

What DB are you using?

Profile icon
yash1441

@novaflippers
Replit's Database

Profile icon
[deleted]

@yash1441
do you have a parser?

Profile icon
yash1441

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