Celargs už i velkejma :sjeta:
This commit is contained in:
parent
14f2fdfcac
commit
14e3dbdbf7
6
app.js
6
app.js
@ -34,12 +34,12 @@ client.on("message", function (mes) {
|
||||
if (process.env.IGNORE_MESS) return;
|
||||
|
||||
runEvent('on_message', [mes]);
|
||||
const [mes_prefix, komand, ...args] = mes.content.toLowerCase().split(' ');
|
||||
if (mes_prefix !== prefix) return;
|
||||
const [mes_prefix, komand, ...args] = mes.content.split(' ');
|
||||
if (mes_prefix.toLowerCase() !== prefix) return;
|
||||
|
||||
const celArgs = args.join(' ');
|
||||
for (let i = 0; i < komand_handlery.length; i++) {
|
||||
if (komand_handlery[i](mes, komand, celArgs)) return;
|
||||
if (komand_handlery[i](mes, komand.toLowerCase(), celArgs)) return;
|
||||
}
|
||||
mes.channel.send('co to znamena ti gadzovko');
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user