mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-03 23:36:23 +02:00
upgrade
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
import { Message, Client } from 'discord.js';
|
||||||
|
import db from '../../fonctions/instanceDB';
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
aliases: [],
|
||||||
|
description: 'Afficher toutes les informations d\'une tâche.',
|
||||||
|
emote: '⏱️',
|
||||||
|
utilisation: '<id>',
|
||||||
|
|
||||||
|
async execute(message: Message, args: string[], client: Client) {
|
||||||
|
let id = args[0];
|
||||||
|
if (!id) {
|
||||||
|
return message.edit('Veuillez entrer un id');
|
||||||
|
}
|
||||||
|
db.get(`SELECT * FROM task WHERE id = ?`, [id], (err: any, row: any) => {
|
||||||
|
if (err) {
|
||||||
|
console.error(err.message);
|
||||||
|
}
|
||||||
|
if (!row) {
|
||||||
|
return message.edit('Aucune tâche avec cet id.');
|
||||||
|
}
|
||||||
|
message.edit(`# Informations de la tâche ${row.name} :\n- Id : ${row.id}\n- Nom : ${row.name}\n- Temps : ${row.time} minutes\n- Code :\n\`\`\`js\n${row.code}\`\`\``);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { Message, Client } from 'discord.js';
|
||||||
|
import db from '../../fonctions/instanceDB';
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
aliases: ['viewtask', 'alltask', 'tasks', 'tasklist', 'listtasks', 'listtask', 'alltasks', 'viewalltasks', 'alltaskslist', 'alltasklist', 'taskslist', 'listalltasks', 'listalltask'],
|
||||||
|
description: 'Voir toutes les tâches.',
|
||||||
|
emote: '⏱️',
|
||||||
|
utilisation: '',
|
||||||
|
|
||||||
|
async execute(message: Message, args: string[], client: Client) {
|
||||||
|
db.all(`SELECT * FROM task`, (err: any, rows: any) => {
|
||||||
|
if (err) {
|
||||||
|
console.error(err.message);
|
||||||
|
}
|
||||||
|
let tasks = '';
|
||||||
|
rows.forEach((row: any) => {
|
||||||
|
tasks += `\n- ${row.id} - ${row.name} : ${row.time} minutes`;
|
||||||
|
});
|
||||||
|
message.edit(`# Liste des tâches :${tasks}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user