Converted main codebase to typescript

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2023-12-28 13:17:57 +01:00
parent 1d9ded82a4
commit 68fde04bbb
122 changed files with 14230 additions and 1834 deletions

View File

@@ -1,12 +1,13 @@
module.exports = {
import { ChatInputCommandInteraction, ButtonInteraction } from "discord.js"
import { Event } from "../../../interfaces"
const event: Event = {
name: "logBtnsCmds",
description: "Logs all button and command interactions",
type: "event",
event: "interactionCreate",
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
execute(interaction) {
execute(interaction: ChatInputCommandInteraction | ButtonInteraction) {
if (interaction.isCommand()) {
try {
console.log(interaction.user.username + " ran " +
@@ -18,11 +19,16 @@ module.exports = {
interaction.commandName
)
}
} else if (interaction.isButton()) {
}
if (interaction.isButton()) {
console.log(interaction.user.username + "#" +
interaction.user.discriminator + " clicked " +
interaction.customId
)
return
}
}
}
export = event