mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Beep
This commit is contained in:
@@ -25,15 +25,15 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.version = null;
|
this.version = null;
|
||||||
this.champions = new Map();
|
this.cache = new Map();
|
||||||
this.client.setInterval(() => this.champions.clear(), 3600000);
|
this.client.setInterval(() => this.cache.clear(), 3600000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, { champion }) {
|
async run(msg, { champion }) {
|
||||||
if (champion === 'satan') champion = 'teemo';
|
if (champion === 'satan') champion = 'teemo';
|
||||||
try {
|
try {
|
||||||
let data;
|
let data;
|
||||||
if (!this.champions.has(champion)) {
|
if (!this.cache.has(champion)) {
|
||||||
const search = await snekfetch
|
const search = await snekfetch
|
||||||
.get('https://na1.api.riotgames.com/lol/static-data/v3/champions')
|
.get('https://na1.api.riotgames.com/lol/static-data/v3/champions')
|
||||||
.query({ api_key: RIOT_KEY });
|
.query({ api_key: RIOT_KEY });
|
||||||
|
|||||||
Reference in New Issue
Block a user