Merge branch 'dev' into 'main'

Dev

See merge request illegitimate/illegitimate-bot!196
This commit is contained in:
2024-01-24 09:50:31 +00:00

View File

@@ -9,19 +9,29 @@ export = {
execute(interaction: ChatInputCommandInteraction | ButtonInteraction) {
if (interaction.isCommand()) {
let subcommand: string | null
try {
subcommand = interaction.options.getSubcommand()
} catch (e) {
subcommand = null
}
if (subcommand) {
console.log(
color(
interaction.user.username + " ran " +
interaction.user.username + "#" +
interaction.user.discriminator + " ran " +
interaction.commandName + " " +
interaction.options.getSubcommand(),
subcommand,
"pink"
)
)
} catch {
} else {
console.log(
color(
interaction.user.username + " ran " +
interaction.user.username + "#" +
interaction.user.discriminator + " ran " +
interaction.commandName,
"pink"
)