update readme & remove useless comments

This commit is contained in:
Domin-MND
2023-10-31 20:07:21 +03:00
parent a41c825cdd
commit 5674e3c1b6
3 changed files with 94 additions and 19 deletions

View File

@@ -141,14 +141,12 @@ interface Command {
}
function handleCommands(client: Client, commands: Command[]) {
// Registering commands when client is ready
client.once(Events.ClientReady, () => {
for (const { name, description } of commands) {
client.application?.commands.create({ name, description })
}
})
// Subscribing to interactionCreate event
client.on(Events.InteractionCreate, (interaction) => {
if (interaction.isCommand()) {
for (const command of commands) {