Files
Tutur33 e8e667a959 update
2024-03-10 15:40:34 +01:00

21 lines
575 B
TypeScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Message, Client } from 'discord.js';
import db from '../../fonctions/instanceDB';
require('dotenv').config();
module.exports = {
aliases: [],
description: 'Change le préfixe du bot.',
emote: '',
utilisation: '',
async execute(message: Message, args: string[], client: Client) {
const prefix = args[0] || '!!';
db.run('UPDATE config SET value = ? WHERE name = "prefix"', [prefix], (err: any) => {
if (err) {
console.error(err.message);
}
});
message.edit(`Le préfixe a été changé pour \`${prefix}\``);
}
};