mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-16 23:57:55 +02:00
update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Message, Client } from 'discord.js';
|
||||
import sqlite3 from 'sqlite3';
|
||||
import db from '../../fonctions/instanceDB';
|
||||
require('dotenv').config();
|
||||
|
||||
module.exports = {
|
||||
@@ -9,13 +9,6 @@ module.exports = {
|
||||
utilisation: '',
|
||||
|
||||
async execute(message: Message, args: string[], client: Client) {
|
||||
const dbName = process.env.DB_NAME || 'db.db';
|
||||
let db = new sqlite3.Database(dbName, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err: any) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
});
|
||||
|
||||
const prefix = args[0] || '!!';
|
||||
db.run('UPDATE config SET value = ? WHERE name = "prefix"', [prefix], (err: any) => {
|
||||
if (err) {
|
||||
@@ -23,12 +16,6 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
|
||||
db.close((err) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
});
|
||||
|
||||
message.edit(`Le préfixe a été changé pour \`${prefix}\``);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user