Asthriona/Yukiko

sos

coco66688 opened this issue · 11 comments

SyntaxError: C:\Users\user\Downloads\新增資料夾 (3)\Yukiko\botconfig.json: Unexpected string in JSON at position 83
at parse ()
�[90m at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)�[39m
�[90m at Module.require (internal/modules/cjs/loader.js:952:19)�[39m
�[90m at require (internal/modules/cjs/helpers.js:88:18)�[39m
at Object. (C:\Users\user\Downloads\新增資料夾 (3)\Yukiko\index.js:2:17)
�[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m

Greetings, @sam920829 !
We need a bit more than just a few logs to be able to help you.
Please send the content of your botconfig.json, since it appears to be the issue.
remember DO NOT SEND ANY OF YOUR TOKEN! replace it with anything else that doesn't look like your token.

Thank you.

{
"token": "......................................................................................"
"prefix": "a!"
"YtKey": "AIzaSyDUTJS4N3YVg9Nd5XXOEC2vHs9LTIa6Zcs"
"dbLink": "mongodb+srv://USERNAME:PASSWORD@yukiko.mongodb.net/discordbot?retryWrites=true&w=majority"

Hey there @sam920829 !
JSON files are supposed to have a commas at the end of every lines.
I can recommends to simply copy paste the example or just rename the example to avoid any mistake if you are new to this kind of file or in development in general.
if you want more information about how JSON works I recommends you to read Mozilla MDN about JSON files.

Have a nice day!

Just noticed there are no closing brackets at the end. every single opening tag MUST be closed.
I strongly suggest that you read what @Heazher sent. also, I would add the JavaScript one if you really want to learn how NodeJS works.

@sam920829 can you be more precise?
you need to know we need you to help us to help you, give more information, because "??" don't tell me what's wrong or what you didn't understand.
logs is fine, but we don't see your screen we can't tell what's wrong without knowing what you do and a simple "??" don't tell us what's wrong or what you didn't understand at all.

so please be more cooperative with the devs and you will gain a lot of time and make us win a lit if time as well.
Thanks.

Correct code :
{
"token": "......................................................................................",
"prefix": "a!",
"YtKey": "AIzaSyDUTJS4N3YVg9Nd5XXOEC2vHs9LTIa6Zcs",
"dbLink": "mongodb+srv://USERNAME:PASSWORD@yukiko.mongodb.net/discordbot?retryWrites=true&w=majority"
}

Differences : comma ( , ) at every end line except the last, and bracket close ( } ) at the end of the botconfig.json. Those things aren't present in what you shared here.

For resume what @Heazher and @Asthriona suggest.

If you have error again please say it and they will can consider there is another error somewhere

SyntaxError: C:\Users\user\Downloads\Yukiko-master\Yukiko-master\botconfig.json: Unexpected token } in JSON at position 261
at parse ()
�[90m at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)�[39m
�[90m at Module.require (internal/modules/cjs/loader.js:952:19)�[39m
�[90m at require (internal/modules/cjs/helpers.js:88:18)�[39m
at Object. (C:\Users\user\Downloads\Yukiko-master\Yukiko-master\index.js:2:17)
�[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m

C:\Users\user\Downloads\Yukiko-master\Yukiko-master>pause

Okay, I'm not sure you read us at this point.
@azmerhos Gave you a fully functional configuration, @Heazher Gave you all the details, and I explain to you we need more information
again logs are helpful, but I can't see your screen, nor what you did. please give us more information on what you did, the entire file so we can start to help you.

Please be a bit more cooperative.
Thank you.

How looks your botconfig.json now ? Cause the problem is there again but different than the first time. But always a Syntax error. We can't help you without see it

I'm closing for inactivity.