import { env } from "@tealfmbot/common/constants"; import { logger } from "@tealfmbot/common/logger"; import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js"; const LOGIN_URL = process.env.NODE_ENV === "development" ? `127.0.0.1:${env.WEB_SERVICE_PORT}` : env.PUBLIC_URL; export default { data: new SlashCommandBuilder() .setName("login") .setDescription( "Authenticate with your Atmosphere account and request your listens to be tracked", ), async execute(interaction: ChatInputCommandInteraction) { await interaction.reply(`Log in here and request to be tracked: ${LOGIN_URL}/login`); logger.info( `starting authentication process for ${interaction.user.username} in guild ${interaction.guildId} at ${new Date().toJSON()}`, ); }, };