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 # Build the TypeScript code
RUN npm run build RUN npm run build
# Set environment variable for Discord token
ENV DISCORD_TOKEN=""
# Expose HTTP port # Expose HTTP port
EXPOSE 8080 EXPOSE 8080

View File

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