mirror of
https://github.com/arthur-pbty/gestion-perso.git
synced 2026-06-12 08:14:35 +02:00
add prefix
This commit is contained in:
@@ -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(/ +/);
|
||||
|
||||
Reference in New Issue
Block a user