add prefix

This commit is contained in:
Tutur33
2024-02-23 02:57:52 +01:00
parent 31d7e23f14
commit c732820e4d
8 changed files with 1465 additions and 5 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
const { Events } = require("discord.js");
const getServerPrefix = require("../fonctions/getServerPrefix");
module.exports = {
name: Events.MessageCreate,
async execute(message, client) {
const prefix = "+";
if (message.author.bot) return;
const prefix = await getServerPrefix(message.guild.id);
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);