From 5fd014b67711aa8b3a3edb4cd44cbd994a5b2832 Mon Sep 17 00:00:00 2001 From: grngxd <36968271+grngxd@users.noreply.github.com> Date: Thu, 31 Jul 2025 19:39:56 +0100 Subject: [PATCH] register cmd --- cmd/register.ts | 13 ++++++++----- globals.d.ts | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cmd/register.ts b/cmd/register.ts index a72d90c..6612a69 100644 --- a/cmd/register.ts +++ b/cmd/register.ts @@ -1,4 +1,4 @@ -import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js"; +import { ChatInputCommandInteraction, MessageFlags, SlashCommandBuilder } from "discord.js"; import { db } from "../db/db"; export const data = new SlashCommandBuilder() @@ -8,11 +8,14 @@ export const data = new SlashCommandBuilder() export const execute = async (interaction: ChatInputCommandInteraction) => { const existingUser = await db.get<{ id: string }>`SELECT id FROM users WHERE id = ${interaction.user.id}`; if (existingUser) { - await interaction.reply({ content: "You already have a stereo account.", ephemeral: true }); + await interaction.reply({ content: "you already have a stereo account", flags: MessageFlags.Ephemeral }); return; - } - - await interaction.reply({ content: "Your stereo account has been created!", ephemeral: true }); + } + + await interaction.reply({ + content: `visit [this link](${process.env.API + "/auth/login"}) to create your stereo account`, + flags: MessageFlags.Ephemeral + }) } export default [data, execute] as const; \ No newline at end of file diff --git a/globals.d.ts b/globals.d.ts index b9d593c..06cbe52 100644 --- a/globals.d.ts +++ b/globals.d.ts @@ -4,8 +4,11 @@ declare module "bun" { TOKEN: string; CLIENT_ID: string; - // stereo + // db DB_URL: string; DB_TYPE: "sqlite" | "postgres"; + + // web + API: string; } } \ No newline at end of file