Fix: fixing discord bot login issue

This commit is contained in:
Barry Yip 2025-06-07 23:23:47 +08:00
parent 163e221120
commit a56ec56d00
2 changed files with 10 additions and 4 deletions

View File

@ -16,6 +16,9 @@ COPY . .
# Build the TypeScript code
RUN npm run build
# Set environment variable for Discord token
ENV DISCORD_TOKEN=""
# Expose HTTP port
EXPOSE 8080

View File

@ -1,10 +1,13 @@
startCommand:
type: http
type: stdio
configSchema:
type: object
required: ["discordToken"]
required:
- discordToken
properties:
discordToken:
type: string
title: "Discord Bot Token"
description: "Discord bot token. Obtain this from the Discord Developer Portal."
description: The bot token for Discord integration.
commandFunction:
|-
config => ({command: 'node', args: ['./build/index.js', '--transport', 'http', '--port', '8080'], env: {DISCORD_TOKEN: config.discordToken}})