File Creations
redicides
TRIALOP

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

redicides
TRIALOP

2 years ago

bdf52ca3-6199-4fdc-b415-bc60d97ba135


dev
MODERATOR

2 years ago

Your app should be able to create files inside of the container it runs on


dev
MODERATOR

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]()


redicides
TRIALOP

2 years ago

Right, I see


redicides
TRIALOP

2 years ago

Normally my bot is meant to be run on a linux vps but compatibility is always a good thing


adam
MODERATOR

2 years ago

or use a database rather than a file


adam
MODERATOR

2 years ago

that would make it even more widely compatible with more setups


redicides
TRIALOP

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


redicides
TRIALOP

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


brody
EMPLOYEE

2 years ago

not as painful as managing configuration through yaml files


redicides
TRIALOP

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


redicides
TRIALOP

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


brody
EMPLOYEE

2 years ago

fair enough, but Adam didn't mean store config in database, he just meant to store the data in the database


redicides
TRIALOP

2 years ago

Oh, I see


redicides
TRIALOP

2 years ago

I'm still messing around w the system so idk


redicides
TRIALOP

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


brody
EMPLOYEE

2 years ago

gotcha


Loading...