Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!196
This commit is contained in:
@@ -9,19 +9,29 @@ export = {
|
|||||||
|
|
||||||
execute(interaction: ChatInputCommandInteraction | ButtonInteraction) {
|
execute(interaction: ChatInputCommandInteraction | ButtonInteraction) {
|
||||||
if (interaction.isCommand()) {
|
if (interaction.isCommand()) {
|
||||||
|
let subcommand: string | null
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
subcommand = interaction.options.getSubcommand()
|
||||||
|
} catch (e) {
|
||||||
|
subcommand = null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subcommand) {
|
||||||
console.log(
|
console.log(
|
||||||
color(
|
color(
|
||||||
interaction.user.username + " ran " +
|
interaction.user.username + "#" +
|
||||||
|
interaction.user.discriminator + " ran " +
|
||||||
interaction.commandName + " " +
|
interaction.commandName + " " +
|
||||||
interaction.options.getSubcommand(),
|
subcommand,
|
||||||
"pink"
|
"pink"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} catch {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
color(
|
color(
|
||||||
interaction.user.username + " ran " +
|
interaction.user.username + "#" +
|
||||||
|
interaction.user.discriminator + " ran " +
|
||||||
interaction.commandName,
|
interaction.commandName,
|
||||||
"pink"
|
"pink"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user