24 lines
989 B
JavaScript
24 lines
989 B
JavaScript
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 });
|
|
}
|
|
},
|
|
}; |