a year ago
I basically made a discord bot and I wanna make it 24/7 active, I asked gpt it told me railway, I went to railway did everything good but in the end the deployment always got crashed... I want help!
44 Replies
a year ago
Hey, please elaborate more on it and provide logs.
Could you send your logs and, if possible, a link to your GitHub repository? @π’π²π¬π΄π·πΈπ΅π
Thank you. Could you please send me the crash logs so I can check the exact error? @π’π²π¬π΄π·πΈπ΅π
a year ago
Hey, please change your Discord bot token immediately, it has been leaked as you have committed your .env file.
a year ago
Please send the error logs, other users can't view your project as it is not public.
Starting Container
[dotenv@17.0.1] injecting env (0) from .env β [tip] encrypt with dotenvx: https://dotenvx.com
237 | shard.gotGuild(data.d.id);
238 | }
239 | });
240 |
241 | this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => {
242 | this.shards.get(shardId).onReadyPacket(data);
^error: An invalid token was provided.
code: "TokenInvalid"
at /app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:242:23Bun v1.2.10 (Linux x64)
[dotenv@17.0.1] injecting env (0) from .env β [tip] encrypt with dotenvx: https://dotenvx.com
237 | shard.gotGuild(data.d.id);
238 | }
239 | });
240 |
241 | this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => {
242 | this.shards.get(shardId).onReadyPacket(data);
^error: An invalid token was provided.
code: "TokenInvalid"
at /app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:242:23Bun v1.2.10 (Linux x64)
[dotenv@17.0.1] injecting env (0) from .env β [tip] encrypt with dotenvx: https://dotenvx.com
237 | shard.gotGuild(data.d.id);
238 | }
239 | });
240 |
241 | this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => {
242 | this.shards.get(shardId).onReadyPacket(data);
^error: An invalid token was provided.
code: "TokenInvalid"
at /app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:242:23Bun v1.2.10 (Linux x64)
[dotenv@17.0.1] injecting env (0) from .env β [tip] encrypt with dotenvx: https://dotenvx.com
237 | shard.gotGuild(data.d.id);
238 | }
239 | });
240 |
241 | this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => {
242 | this.shards.get(shardId).onReadyPacket(data);
^error: An invalid token was provided.
code: "TokenInvalid"
The issue is that the bot canβt find the Discord token in the environment variables. Thatβs why youβre getting the error.
Did you add the token correctly in the βVariablesβ section on Railway?
The problem is that the variable is not being found. Either you havenβt set the variable in Railway, or you are using an invalid token.
a year ago
!s
Status changed to Solved uxuz β’ about 1 year ago
