more reakce

This commit is contained in:
histmy 2021-03-30 22:45:45 +02:00
parent f868686256
commit 14f2fdfcac

View File

@ -103,6 +103,28 @@ module.exports = {
mes.channel.send('dobre rano hajzle');
break;
case 'zareaguj':
case 'reakce':
case 'reaguj':
if (!celArgs) {
mes.channel.send('retard');
break;
}
let naCo;
(async () => {
if (mes.reference) {
naCo = await mes.channel.messages.fetch(mes.reference.messageID);
} else {
const msgs = [...mes.channel.messages.cache.values()];
naCo = msgs[msgs.length - 2];
}
naCo.react(celArgs)
.catch(() => mes.channel.send('retard'));
})();
break;
default:
return false;
}