How would I use railway to run my discord bot with the command prompt shut

arishiotingTRIAL

8 months ago

Im new to this type of stuff and the title is really what I need help with. Many thanks πŸ™πŸΎ

0 Replies

arishiotingTRIAL

8 months ago

N/A


arishiotingTRIAL

8 months ago

I mean I don’t know my project ID atm. Like I said in new to this


joshua-mo-143HOBBY

8 months ago

hi πŸ™‚


joshua-mo-143HOBBY

8 months ago

is your code in a github repo?


joshua-mo-143HOBBY

8 months ago

or is it all local?


arishiotingTRIAL

8 months ago

Github


arishiotingTRIAL

8 months ago

It’s the SkinPeek discord bot


arishiotingTRIAL

8 months ago

But made my own with things from GitHub


joshua-mo-143HOBBY

8 months ago

you should be able to just deploy it from the web UI then


arishiotingTRIAL

8 months ago

How would I do that again


joshua-mo-143HOBBY

8 months ago

dashboard -> new


arishiotingTRIAL

8 months ago

My main issue is the discord bot runs but only with the command prompt open. If the command prompt is closed the bot will stop working


joshua-mo-143HOBBY

8 months ago

yeah so in a deployed environment, you won't need to worry about that. the reason why it stops on close is because it's just a process running inside of the terminal


arishiotingTRIAL

8 months ago

So there is a way to prevent that


joshua-mo-143HOBBY

8 months ago

not closing it


arishiotingTRIAL

8 months ago

Oh


joshua-mo-143HOBBY

8 months ago

or alternatively, just deploy it to a web host like railway if you need 24/7 access


arishiotingTRIAL

8 months ago

Yes exactly


arishiotingTRIAL

8 months ago

Ok so


arishiotingTRIAL

8 months ago

On railway I go to dashboard -> new


arishiotingTRIAL

8 months ago

Or is that in github


joshua-mo-143HOBBY

8 months ago

no you do it on railway


joshua-mo-143HOBBY

8 months ago

you're just using a github repo as the data source for files to be deployed


joshua-mo-143HOBBY

8 months ago

the reason why you can do it directly from github is because railway uses oauth2 from github to automatically authenticate you (github has a login gateway that developers can use programatically to be an "authorised application" for users who opt-in to allowing railway to access certain information in your gh account. although this doesn't stop malicious code, etc - but this is irrelevant at this point in time)


arishiotingTRIAL

8 months ago

Is railway free to use?


joshua-mo-143HOBBY

8 months ago

i think the trial plan is free yeah, but after that it's $5/month + usage


arishiotingTRIAL

8 months ago

So I would have to pay to run my bot 24/7


arishiotingTRIAL

8 months ago

So I would copy this

1280145876945211600


arishiotingTRIAL

8 months ago

And put it here

1280145929042923500


joshua-mo-143HOBBY

8 months ago

Yes that's correct.

Costs are based on how much resource you use, so it's not a fixed amount. I will say though that obviously, the more compute/data you use, the more it'll cost


joshua-mo-143HOBBY

8 months ago

Sorry I just wanted to quickly say - iirc the Hobby plan should come with $5 usage. If you're just using Railway for a Discord bot, it should come under the $5


arishiotingTRIAL

8 months ago

This right?

1280146962938855400


arishiotingTRIAL

8 months ago

And use this towards one month


joshua-mo-143HOBBY

8 months ago

Yes


joshua-mo-143HOBBY

8 months ago

You're currently on the trial plan which comes with $5 free usage but after that you'll likely need to upgrade to Hobby tier


arishiotingTRIAL

8 months ago

1280147741132984600


8 months ago

This means you are on a limited trial, and cannot deploy code, only databases. To deploy code, you would need to upgrade to the hobby plan


arishiotingTRIAL

8 months ago

Oh


How would I use railway to run my discord bot with the command prompt shut - Railway Help Station