A discord bot for teal.fm
discord
tealfm
music
1import { env } from "@tealfmbot/common/constants";
2import { logger } from "@tealfmbot/common/logger";
3import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
4
5const LOGIN_URL =
6 process.env.NODE_ENV === "development" ? `127.0.0.1:${env.WEB_SERVICE_PORT}` : env.PUBLIC_URL;
7
8export default {
9 data: new SlashCommandBuilder()
10 .setName("login")
11 .setDescription(
12 "Authenticate with your Atmosphere account and request your listens to be tracked",
13 ),
14 async execute(interaction: ChatInputCommandInteraction) {
15 await interaction.reply(`Log in here and request to be tracked: ${LOGIN_URL}/login`);
16 logger.info(
17 `starting authentication process for ${interaction.user.username} in guild ${interaction.guildId} at ${new Date().toJSON()}`,
18 );
19 },
20};