INNER CODE UNIT · TypeScript

args

im4codes/imcodes · server/src/platform/handlers/discord/index.ts:84

      const args = options.map((o: { value: unknown }) => String(o.value));
      const content = args.join(' ');

      return {
        platform: 'discord',
        botId: config.botId,
        channelId: guildId ? `${guildId}:${channelId}` : channelId,
        userId,
        content,
        messageId: body.id,
        isCommand: true,
        command: cmdName,
        args,
        raw: body,
      };
    }

    const content = body.data?.custom_id ?? body.message?.content ?? '';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…