tweaked ui and updated invite command

This commit is contained in:
2025-10-04 10:27:45 -04:00
parent 834e77a93e
commit 053ffe51f7
9 changed files with 496 additions and 343 deletions

View File

@@ -39,7 +39,8 @@ client.on('interactionCreate', async interaction => {
try {
// call backend delete endpoint
const fetch = require('node-fetch');
const url = `http://localhost:${process.env.PORT || 3002}/api/servers/${interaction.guildId}/invites/${code}`;
const backendBase = process.env.BACKEND_BASE || `http://${process.env.HOST || '127.0.0.1'}:${process.env.PORT || 3002}`;
const url = `${backendBase}/api/servers/${interaction.guildId}/invites/${code}`;
await fetch(url, { method: 'DELETE' });
await interaction.reply({ content: 'Invite deleted.', ephemeral: true });
} catch (e) {