Closed X-Sly closed 1 year ago
Good day, make sure you actually follow the proper JSON syntax for your config file, recheck for any missing trailing commas, double quotes, and curly braces etc., then start the bot again.
If you are unable to fix it yourself, recopy the original config file used as template and refill your credentials again
If it still persists, try sending your local.json
here without your credentials, I will try to see where the syntax error is.
I tried sending the file, but it said it was unsupported (this is the copy I made, cleared the nick, password, and bot token)
{ "irc": { "server": "irc.ppy.sh", "nick": "", "opt": { "port": 6667, "password": "" } }, "Lobby": { "authorized_users": [""], "listref_duration_ms": 1000, "info_message": "- Osu Auto Host Rotation Bot ver ${version} -\n- The host rotation is managed with a queue. Players are added to the queue when joining a multiplayer lobby and are sent to the back of the queue once their beatmap has been played.\n- Check the links > [https://github.com/Meowhal/osu-ahr/blob/master/CMDLIST.md Command List] | [https://github.com/Meowhal/osu-ahr Source Code]", "info_message_cooltime_ms": 60000, "stat_timeout_ms": 5000, "info_message_announcement_interval_ms": 0, "transferhost_timeout_ms": 5000 }, "AfkKicker": { "enabled": true, "threshold": 6, "cooltime_ms": 30000 }, "AutoHostSelector": { "show_host_order_after_every_match": true, "host_order_chars_limit": 90, "host_order_cooltime_ms": 15000, "deny_list": [] }, "AutoStartTimer": { "enabled": false, "doClearHost": false, "waitingTime": 90 }, "CacheCleaner": { "enabled": true, "intervalMs": 86400000 }, "HistoryLoader": { "fetch_interval_ms": 0 }, "HostSkipper": { "vote_rate": 0.5, "vote_min": 2, "vote_cooltime_ms": 5000, "vote_msg_defer_ms": 5000, "afk_check_timeout_ms": 5000, "afk_check_interval_first_ms": 45000, "afk_check_interval_ms": 90000, "afk_check_do_skip": true }, "LobbyKeeper": { "mode": mania, "size": 8, "password": null, "mods": null, "hostkick_tolerance": 4, "title": "2.5-3.8* | 4k | Auto-host rotate" }, "LobbyTerminator": { "terminate_time_ms": 60000 }, "MapChecker": { "enabled": true, "star_min": 2.5, "star_max": 3.8, "length_min": 0, "length_max": 0, "gamemode": "mania", "num_violations_allowed": 3, "allow_convert": true, "map_description": "[https://osu.ppy.sh/b/${map_id} ${title}] | Star Rating: ${star} | Duration: ${length} | Alternative: [https://beatconnect.io/b/${beatmapset_id} (BeatConnect.io)] | [https://kitsu.moe/d/${beatmapset_id} (Kitsu.moe)]" }, "MiscLoader": {}, "MapRecaster": {}, "MatchStarter": { "vote_rate": 0.45, "vote_min": 2, "vote_msg_defer_ms": 5000, "start_when_all_player_ready": true }, "MatchAborter": { "vote_rate": 0.3, "vote_min": 2, "vote_msg_defer_ms": 5000, "auto_abort_rate": 0.5, "auto_abort_delay_ms": 30000, "auto_abort_do_abort": true }, "WordCounter": { "periods": [ { "symbol": "s", "duration_ms": 1000 }, { "symbol": "m", "duration_ms": 60000 } ], "log_interval_ms": 3600000 }, "OahrCli": { "invite_users": [], "password": "" }, "WebApi": { "client_id": 0, "client_secret": "***", "token_store_dir": "data/tokens/", "asGuest": true, "callback": "", "callback_port": 3000 }, "profile": { "profile_expired_day": 7 }, "OahrWeb": { "port": 3112, "staticDir": "src/web/statics", "hostname": "127.0.0.1" }, "LogServer": { "port": 3115 }, "Discord": { "token": "" } }
but doing that seemed to have fixed it
Loading log4js configuration from ./config/log_cli.json D:\PortableGit\osu-ahr\node_modules\config\lib\config.js:844 throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3); ^
Error: Cannot parse config file: 'D:\PortableGit\osu-ahr\config\local.json': SyntaxError: Unexpected token m in JSON at position 1622 at util.parseFile (D:\PortableGit\osu-ahr\node_modules\config\lib\config.js:844:11) at D:\PortableGit\osu-ahr\node_modules\config\lib\config.js:644:26 at Array.forEach ()
at util.loadFileConfigs (D:\PortableGit\osu-ahr\node_modules\config\lib\config.js:643:16)
at new Config (D:\PortableGit\osu-ahr\node_modules\config\lib\config.js:116:27)
at Object. (D:\PortableGit\osu-ahr\node_modules\config\lib\config.js:1492:31)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
Node.js v18.12.1
What is the issue, and how do I fix it.