7 months 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
7 months 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? @𝓢𝓲𝓬𝓴𝓷𝓸𝓵𝔁
7 months ago
Hey, please change your Discord bot token immediately, it has been leaked as you have committed your .env file.
7 months 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.
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.
7 months ago
!s
Status changed to Solved uxuz • 7 months ago
