f0ckv1/src/trigger/del.js

21 lines
627 B
JavaScript
Raw Normal View History

2016-08-23 11:23:25 +00:00
module.exports = (bot, trigger, lib) => {
trigger.add({
name: 'delete',
call: '^\!del (\d+)$',
2016-08-18 13:43:18 +00:00
level: 100,
2016-08-23 11:23:25 +00:00
func: (e) => {
var tmp_channel = bot.getChannel(e.channel.getName(), e.network).names;
lib.getUserlevel(e, e.user.getNick(), tmp_channel, (cb) => {
if(cb.level >= 100) {
var id = orig.split(' ')[1];
sql.query("delete from `f0ck`.`items` where `id` = ?", id).on('end', () => {
e.reply("f0ck "+id+" deleted");
});
}
else
e.reply("no permission");
});
},
desc: 'delete f0ck'
2016-08-18 13:43:18 +00:00
});
};