Commit c8cbc3f2 authored by Morgân von Brylân's avatar Morgân von Brylân

La commande amende permet désormais d'inverser les arguments.

parent 52fa2ae2
......@@ -1023,10 +1023,18 @@ function c_liste(msg, prm)
}
function c_amende(msg, prm)
{
const id = prm.split(" ", 1)[0],
cible = getUser(id);
const id = prm.split(" ", 1)[0];
let somme = prm.length > (id.length + 1) ? prm.substr(id.length + 1).trim() : NaN;
if(!isFinite(somme))
{
const temp = somme;
somme = id;
id = temp;
}
const cible = getUser(id)
if(!isFinite(somme))
msg.author.send(`Nombre incorrect : ${somme}.`).catch(error);
else if(!cible || !zouz.has(cible.id))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment