turn done messages into ephemerals

This commit is contained in:
ShuriZma 2024-04-03 16:46:44 +02:00
parent 7f653930f0
commit 285e6796d0
Signed by: ShuriZma
GPG Key ID: 8D289758EE9B8074
5 changed files with 28 additions and 13 deletions

View File

@ -4,7 +4,7 @@ import {
SlashCommandBuilder,
SlashCommandStringOption,
} from 'discord.js';
import { Bot } from "../bot";
import {Bot} from "../bot";
const option = new SlashCommandStringOption()
.setName('word')
@ -27,6 +27,9 @@ export default {
bot.getDB().run('DELETE FROM library WHERE TRUE');
bot.setCounter(0);
console.log('completely cleared library')
return await interaction.reply('Done!');
return await interaction.reply({
content: 'Done!',
ephemeral: true,
});
},
};

View File

@ -4,7 +4,7 @@ import {
SlashCommandBuilder,
SlashCommandIntegerOption,
} from 'discord.js';
import { Bot } from "../bot";
import {Bot} from "../bot";
const option = (new SlashCommandIntegerOption())
.setName('amount')
@ -20,7 +20,7 @@ export default {
async execute(interaction: ChatInputCommandInteraction) {
const bot = Bot.getInstance();
bot.getDB().run(
'INSERT OR REPLACE INTO config (configKey, value) VALUES (?, ?)',
'INSERT OR REPLACE INTO config (configkey, value) VALUES (?, ?)',
[
'autoEmbedMessages',
interaction.options.data.at(0).value,
@ -30,6 +30,9 @@ export default {
bot.setAutoEmbedMessages(parseInt(interaction.options.data.at(0).value.toString()));
console.log('set auto embed messages to ' + interaction.options.data.at(0).value);
return await interaction.reply('Done!');
return await interaction.reply({
content: 'Done!',
ephemeral: true,
});
},
};

View File

@ -4,8 +4,8 @@ import {
SlashCommandBuilder,
SlashCommandChannelOption,
} from 'discord.js';
import { ChannelType } from 'discord-api-types/v10';
import { Bot } from "../bot";
import {ChannelType} from 'discord-api-types/v10';
import {Bot} from "../bot";
const channelOption = (new SlashCommandChannelOption())
.setName('channel')
@ -22,7 +22,7 @@ export default {
async execute(interaction: ChatInputCommandInteraction) {
const bot = Bot.getInstance();
bot.getDB().run(
'INSERT OR REPLACE INTO config (configKey, value) VALUES (?, ?)',
'INSERT OR REPLACE INTO config (configkey, value) VALUES (?, ?)',
[
'channelId',
interaction.options.data.at(0).value,
@ -32,6 +32,9 @@ export default {
bot.setChannel(interaction.options.data.at(0).value.toString());
console.log('set channel to ' + interaction.options.data.at(0).value);
return await interaction.reply('Done!');
return await interaction.reply({
content: 'Done!',
ephemeral: true,
});
},
};

View File

@ -4,7 +4,7 @@ import {
SlashCommandBuilder,
SlashCommandStringOption,
} from 'discord.js';
import { Bot } from "../bot";
import {Bot} from "../bot";
const option = (new SlashCommandStringOption())
.setName('prefix')
@ -20,7 +20,7 @@ export default {
async execute(interaction: ChatInputCommandInteraction) {
const bot = Bot.getInstance();
bot.getDB().run(
'INSERT OR REPLACE INTO config (configKey, value) VALUES (?, ?)',
'INSERT OR REPLACE INTO config (configkey, value) VALUES (?, ?)',
[
'ignorePrefix',
interaction.options.data.at(0).value,
@ -30,6 +30,9 @@ export default {
bot.setIgnorePrefix(interaction.options.data.at(0).value.toString());
console.log('set ignore prefix to ' + interaction.options.data.at(0).value);
return await interaction.reply('Done!');
return await interaction.reply({
content: 'Done!',
ephemeral: true,
});
},
};

View File

@ -30,6 +30,9 @@ export default {
bot.setModRole(interaction.options.data.at(0).value.toString());
console.log('set mod role to ' + interaction.options.data.at(0).value);
return await interaction.reply('Done!');
return await interaction.reply({
content: 'Done!',
ephemeral: true,
});
},
};