is there any way to indefinitely suspend a service?

Eethannnnnnn3/21/2023
Without removing a deployment, I just want to turn off a service to test it locally (the deployment would interfere with it if I test local). I don't see an option to do this. Am I missing something?
Eethannnnnnn3/21/2023
N/A
Bbrody3/21/2023
there is no such feature, only removing deployment
Bbrody3/21/2023
but i will say if your local tests can interfere with the app running on railway, youre doing something wrong
Eethannnnnnn3/21/2023
It's a discord bot. The only way I can test is by it connecting with Discord's API, so both of them have real effects.
Bbrody3/21/2023
then you want a test bot and a prod bot
Eethannnnnnn3/21/2023
If I remove a deployment, do I basically have to push a dummy commit to the GitHub repo to redeploy?
Bbrody3/21/2023
yes
Bbrody3/21/2023
^
Eethannnnnnn3/21/2023
In that case I'd have to set up a whole new bot and its token, which is definitely the best practice but I'm too lazy for that haha
Eethannnnnnn3/21/2023
But I suppose I should
Bbrody3/21/2023
you should, ruining tests with the main (production) bot token is big bad
FFragly3/21/2023
I recommend this too
FFragly3/21/2023
here's a good way to do it, or at least how I do it
FFragly3/21/2023
so i have a bat file which basically starts the bot
in my bot i have the bot check for a certain file which I've .gitignored
if it finds it i know it's running locally, so I then switch out the bot token with my test bot token
otherwise if it can't find it ( it's running from railway ) then i use the main bot's token
FFragly3/21/2023
so running the bat file will run it on my test bot
and running the same command on railway ( npm start ) will run the test bot
Bbrody3/21/2023
lol
FFragly3/21/2023
idk if this is standard, and idk if there's a better way
FFragly3/21/2023
but that's how I do it and it works for me
Bbrody3/21/2023
in my bots code i check RAILWAY_ENVIRONMENT == "production" if so it will use the production token, otherwise it will use local token
Bbrody3/21/2023
fragly is kinda doing the same thing, but in a very round-about way
FFragly3/21/2023
what's RAILWAY_ENVIRONMENT?
FFragly3/21/2023
is that something in env?
FFragly3/21/2023
dang
FFragly3/21/2023
that's neat, the reason I'm not doing something like that btw is because I might want to host the main bot locally
in that case I just remove the file ( named dev )
Eethannnnnnn3/21/2023
Ah okay gotcha
Eethannnnnnn3/21/2023
I just hate messing with token stuff, but I suppose I will go ahead and do that
Eethannnnnnn3/21/2023
Thank you guys :)
FFragly3/21/2023
npp
Bbrody3/21/2023
i can run my bot locally and on railway, the code handles token switching by itself, the above was pseudo code
FFragly3/21/2023
oh okay
Eethannnnnnn3/21/2023
Right so you just hotswap the token when running locally?
Eethannnnnnn3/21/2023
Yeah that's not that difficult really then
Bbrody3/21/2023
yep basically, super easy, way easier than checking for a file
FFragly3/21/2023
yea fair point
FFragly3/21/2023
I'll keep my file though :sunglas:
Bbrody3/21/2023
disk access go brrr
FFragly3/21/2023
hehe
Eethannnnnnn3/21/2023
Discord permissions are just insanely annoying to fiddle with
Eethannnnnnn3/21/2023
Or I'm just dumb
FFragly3/21/2023
wdyym, it's just checkboxes
Bbrody3/21/2023
por qué no los dos
Eethannnnnnn3/21/2023
Yeah but I always forget which permissions are necessary for my bot
Eethannnnnnn3/21/2023
So I just check admin usually lol
FFragly3/21/2023
fair, normally I just make the bot admin when it's like a dedicated bot for a server
FFragly3/21/2023
yea
ADA Dumb3/21/2023
Hopping in here to say that it is possible, remove the latest deployment and turn off the branch trigger in settings
ADA Dumb3/21/2023
New deployments won't be made if the branch trigger is off