mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 14:20:51 +02:00
Satan
This commit is contained in:
@@ -26,6 +26,7 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { champion }) {
|
||||
if (champion === 'satan') champion = 'teemo';
|
||||
try {
|
||||
const search = await snekfetch
|
||||
.get('https://na1.api.riotgames.com/lol/static-data/v3/champions')
|
||||
|
||||
@@ -31,13 +31,13 @@ module.exports = class TranslateCommand extends Command {
|
||||
type: 'string',
|
||||
validate: target => {
|
||||
const value = target.toLowerCase();
|
||||
if (codes[value] || Object.values(codes).find(entry => entry.toLowerCase() === value)) return true;
|
||||
if (codes[value] || Object.keys(codes).find(key => codes[key.toLowerCase()] === value)) return true;
|
||||
return `Invalid target, please enter either ${list(Object.keys(codes), 'or')}.`;
|
||||
},
|
||||
parse: target => {
|
||||
const value = target.toLowerCase();
|
||||
if (codes[value]) return value;
|
||||
return codes[Object.values(codes).find(entry => entry.toLowerCase() === value)];
|
||||
return Object.keys(codes).find(key => codes[key.toLowerCase()] === value);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -47,13 +47,13 @@ module.exports = class TranslateCommand extends Command {
|
||||
default: '',
|
||||
validate: base => {
|
||||
const value = base.toLowerCase();
|
||||
if (codes[value] || Object.values(codes).find(entry => entry.toLowerCase() === value)) return true;
|
||||
if (codes[value] || Object.keys(codes).find(key => codes[key.toLowerCase()] === value)) return true;
|
||||
return `Invalid base, please enter either ${list(Object.keys(codes), 'or')}.`;
|
||||
},
|
||||
parse: base => {
|
||||
const value = base.toLowerCase();
|
||||
if (codes[value]) return value;
|
||||
return codes[Object.values(codes).find(entry => entry.toLowerCase() === value)];
|
||||
return Object.keys(codes).find(key => codes[key.toLowerCase()] === value);
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user