mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-03 23:36:23 +02:00
26 lines
839 B
TypeScript
26 lines
839 B
TypeScript
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}\`\`\``);
|
|
});
|
|
}
|
|
}; |