只是当人们使用教程 !ping 命令时,我想计算多少次并将其显示在聊天中。就像“ping 已经被使用过很多次”一样,我发现了一些关于 quick.db 的内容,但仍然不太了解。目前,消息显示为 [This has been used This NaN times!!!]
module.exports = {
name: 'ping',
description: 'Ping!',
execute (message, args, ) {
const db = require('quick.db')
var times = []
db.set('times', {hello: 'hi'})
db.add('times.used', 1)
let timesused = times.used + 1;
message.reply('pong');
message.channel.send(`This has been used This ${timesused} times!!!`);
},
};