trigger rizonrpg -> irpg
This commit is contained in:
parent
0520d49a67
commit
0b77b61746
@ -348,8 +348,8 @@ module.exports = bot => {
|
||||
}
|
||||
});
|
||||
|
||||
bot._trigger.set("rizonrpg", {
|
||||
call: /^(.|\/)rizonrpg/i,
|
||||
bot._trigger.set("irpg", {
|
||||
call: /^(.|\/)irpg/i,
|
||||
level: 0,
|
||||
active: true,
|
||||
clients: ["irc", "tg"],
|
||||
@ -360,8 +360,9 @@ module.exports = bot => {
|
||||
|
||||
request(`http://idlerpg.rizon.net/xml.php?player=${args[0]}`, (err, res, body) => {
|
||||
xmlparse(body, (err, body) => {
|
||||
if(body.player.username.length === 0)
|
||||
if(body.player.username.length <= 1)
|
||||
return e.reply(`player [b]${args[0]}[/b] was not found`);
|
||||
console.log(body);
|
||||
e.reply(`[b]${body.player.username}[/b], the [b]${body.player.class}[/b]: level: ${body.player.level}, online: ${(body.player.online=="1").toString()}.`);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user