Update backend, DB, Commands, Live Reloading
This commit is contained in:
24
discord-bot/commands/list-kickusers.js
Normal file
24
discord-bot/commands/list-kickusers.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const { SlashCommandBuilder } = require('discord.js');
|
||||
const api = require('../api');
|
||||
|
||||
module.exports = {
|
||||
name: 'list-kickusers',
|
||||
description: 'List watched Kick usernames for this server (DISABLED).',
|
||||
enabled: false,
|
||||
dev: true,
|
||||
builder: new SlashCommandBuilder().setName('list-kickusers').setDescription('List watched Kick usernames for this server'),
|
||||
async execute(interaction) {
|
||||
try {
|
||||
const users = await api.getKickUsers(interaction.guildId) || [];
|
||||
if (!users || users.length === 0) {
|
||||
await interaction.reply({ content: 'No Kick users are being watched for this server.', ephemeral: true });
|
||||
return;
|
||||
}
|
||||
const list = users.map(u => `• ${u}`).join('\n');
|
||||
await interaction.reply({ content: `Watched Kick users:\n${list}`, ephemeral: true });
|
||||
} catch (e) {
|
||||
console.error('Error listing kick users:', e);
|
||||
await interaction.reply({ content: 'Failed to retrieve watched users.', ephemeral: true });
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user