initial commit

This commit is contained in:
2024-04-26 16:33:00 +02:00
commit 929d8abc87
7 changed files with 94 additions and 0 deletions

12
events/bot/ready.js Normal file
View File

@ -0,0 +1,12 @@
const { Events, ActivityType } = require("discord.js");
module.exports = {
name: Events.ClientReady,
run(client) {
client.user.setActivity("Fortnite", {type: ActivityType.Playing})
console.log(`${client.user.username} is online`);
}
};

View File

@ -0,0 +1,15 @@
const { Events } = require ("discord.js");
module.exports = {
name: Events.MessageCreate,
run(client, message) {
const prefix = "!";
if(!message.content.startsWith(prefix)) return;
const arrayMessage = message.content.split(" ");
const name = arrayMessage[0].slice(prefix.length, arrayMessage[0].length);
const command = client.commands.get(name);
command.run(client, message);
}
};