2 years ago
I have a function that checks for a file that holds specific data for every guild my bot is on. I'm implementing a function where if the file isn't found it'll be automatically created upon the guildCreate event being emitted.
Does railway allow this? What I mean by allow is if the app has permission to create files in the "working directory" it runs on.
17 Replies
2 years ago
bdf52ca3-6199-4fdc-b415-bc60d97ba135
2 years ago
Your app should be able to create files inside of the container it runs on
2 years ago
although keep in mind, if you want this file to be persistent then you'll want to store it in a [volume]()
2 years ago
Right, I see
2 years ago
Normally my bot is meant to be run on a linux vps but compatibility is always a good thing
2 years ago
or use a database rather than a file
2 years ago
that would make it even more widely compatible with more setups
2 years ago
I would do that but I'm making a bot that relies on yaml for configurations. It's meant to be for private guilds, and with how many configurations options I've added managing all those through a database & command would be way too painful
2 years ago
I tried to keep the idea of the config system as simple as I could and that's why i went with yaml
2 years ago
not as painful as managing configuration through yaml files
2 years ago
Yeah I honestly don't have the patience for almost 100 configuration options, cuz everything is customizable, even the responses n stuff
2 years ago
So yaml seemed like the better choice for a private bot + with the docs I've made to back it up even a child should be able to configure things to their liking
2 years ago
fair enough, but Adam didn't mean store config in database, he just meant to store the data in the database
2 years ago
Oh, I see
2 years ago
I'm still messing around w the system so idk
2 years ago
Also I cache the data upon message create so I don't think it's gonna be that much of a difference
2 years ago
gotcha