File Creations
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.
Solution:Jump to solution
although keep in mind, if you want this file to be persistent then you'll want to store it in a volume
12 Replies
Project ID:
bdf52ca3-6199-4fdc-b415-bc60d97ba135
bdf52ca3-6199-4fdc-b415-bc60d97ba135
Your app should be able to create files inside of the container it runs on
Solution
Right, I see
Normally my bot is meant to be run on a linux vps but compatibility is always a good thing
or use a database rather than a file
that would make it even more widely compatible with more setups
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
I tried to keep the idea of the config system as simple as I could and that's why i went with yaml
not as painful as managing configuration through yaml files
Yeah I honestly don't have the patience for almost 100 configuration options, cuz everything is customizable, even the responses n stuff
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
fair enough, but Adam didn't mean store config in database, he just meant to store the data in the database
Oh, I see
I'm still messing around w the system so idk
Also I cache the data upon message create so I don't think it's gonna be that much of a difference
gotcha