Closed cybormar closed 3 years ago
Yo! I intend to do this later this week which I'm working on a big update, but the self-hosting process for now is very simple (I'm sorry if I miss something, it's my first time doing something open-source for real)
yarn or npm install
.env.exemple
and rename the copy to .env
node . or node index.js
, if all goes well, the title will appear in ASCII by Ritsu and she will be online!Sorry for the last minute explanation, if you have any questions feel free to join in to the support server or send me a DM Remember to follow the license.
https://discord.gg/XuDysZg sazz#0002
Aight, tysm I was confused about what should I put in API_URL but, seems like it's clear now. Tho before I hosted that API on my own PC but it didn't work. I was getting animethemes returning null and the location of the error is from ThemesController.ts line 226. I was also wondering what if I have to put the same MongoDB URL and bot token in that API too?
Aight, tysm I was confused about what should I put in API_URL but, seems like it's clear now. Tho before I hosted that API on my own PC but it didn't work. I was getting animethemes returning null and the location of the error is from ThemesController.ts line 226. I was also wondering what if I have to put the same MongoDB URL and bot token in that API too?
It seems to be something related to the endpoint that Ritsu uses to see the statuses that we change, create a collection in your MongoDB with the id as "servers" and put the rest as described here
https://github.com/RitsuProject/Mio/blob/main/src/models/Servers.ts
Also, i think that maybe I forgot to put in the example of .env, yes, put the token of your instance using the variable DISCORD_TOKEN in .env and the same MongoDB url plz
Aight, tysm I was confused about what should I put in API_URL but, seems like it's clear now. Tho before I hosted that API on my own PC but it didn't work. I was getting animethemes returning null and the location of the error is from ThemesController.ts line 226. I was also wondering what if I have to put the same MongoDB URL and bot token in that API too?
It seems to be something related to the endpoint that Ritsu uses to see the statuses that we change, create a collection in your MongoDB with the id as "servers" and put the rest as described here
https://github.com/RitsuProject/Mio/blob/main/src/models/Servers.ts So, I have to keep the bot token and mongodb same for both Discord Bot and API i see. What id I have to put in Servers collection? Guild ID or My own id or ?
Aight, tysm I was confused about what should I put in API_URL but, seems like it's clear now. Tho before I hosted that API on my own PC but it didn't work. I was getting animethemes returning null and the location of the error is from ThemesController.ts line 226. I was also wondering what if I have to put the same MongoDB URL and bot token in that API too?
It seems to be something related to the endpoint that Ritsu uses to see the statuses that we change, create a collection in your MongoDB with the id as "servers" and put the rest as described here https://github.com/RitsuProject/Mio/blob/main/src/models/Servers.ts So, I have to keep the bot token and mongodb same for both Discord Bot and API i see. What id I have to put in Servers collection? Guild ID or My own id or ?
Put the id as "servers".
Added a little information about self-hosting and other stuff in README.md, i should do this soon in the other repositories like the in the API.
This should be fine right?
yup!
I'm getting this error now.
[GAME_SERVICE] GUILD -> 0000000000000000000 | SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at CentraResponse.json (node_modules\centra\model\CentraResponse.js:17:48)
at phin (node_modules\phin\lib\phin.js:75:33)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async getProviderStatus (src\utils\getProviderStatus.js:14:21)
at async GameService.choose (src\handlers\GameHandler.js:290:20)
at async GameService.getTheme (src\handlers\GameHandler.js:276:19)
at async GameService.startNewRound (src\handlers\GameHandler.js:95:19)
I'm getting this error now.
[GAME_SERVICE] GUILD -> 0000000000000000000 | SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at CentraResponse.json (node_modules\centra\model\CentraResponse.js:17:48) at phin (node_modules\phin\lib\phin.js:75:33) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async getProviderStatus (src\utils\getProviderStatus.js:14:21) at async GameService.choose (src\handlers\GameHandler.js:290:20) at async GameService.getTheme (src\handlers\GameHandler.js:276:19) at async GameService.startNewRound (src\handlers\GameHandler.js:95:19)
Can you access the API URL you put in API_URL and access the path /themes/status?
Like: http://localhost:3001/themes/status and see what appears.
Should be like this:
Just a reminder, if you're running on localhost, the protocol that should generally be used is http, so it's supposed to be something like http://localhost instead of https://localhost
Closing this for now.
sup, is there any guide or anything for self-hosting?