mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Fix league-of-legends-champion
This commit is contained in:
@@ -28,7 +28,6 @@ GOV_KEY=
|
|||||||
IMGUR_KEY=
|
IMGUR_KEY=
|
||||||
OSU_KEY=
|
OSU_KEY=
|
||||||
PERSONAL_GOOGLE_CALENDAR_ID=
|
PERSONAL_GOOGLE_CALENDAR_ID=
|
||||||
RIOT_KEY=
|
|
||||||
STACKOVERFLOW_KEY=
|
STACKOVERFLOW_KEY=
|
||||||
TMDB_KEY=
|
TMDB_KEY=
|
||||||
TUMBLR_KEY=
|
TUMBLR_KEY=
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const { MessageEmbed } = require('discord.js');
|
const { MessageEmbed } = require('discord.js');
|
||||||
const request = require('node-superfetch');
|
const request = require('node-superfetch');
|
||||||
const { RIOT_KEY } = process.env;
|
|
||||||
const buttons = ['Q', 'W', 'E', 'R'];
|
const buttons = ['Q', 'W', 'E', 'R'];
|
||||||
|
|
||||||
module.exports = class LeagueOfLegendsChampionCommand extends Command {
|
module.exports = class LeagueOfLegendsChampionCommand extends Command {
|
||||||
@@ -66,9 +65,7 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetchVersion() {
|
async fetchVersion() {
|
||||||
const { body } = await request
|
const { body } = await request.get('https://ddragon.leagueoflegends.com/api/versions.json');
|
||||||
.get('https://na1.api.riotgames.com/lol/static-data/v3/versions')
|
|
||||||
.query({ api_key: RIOT_KEY });
|
|
||||||
[this.version] = body;
|
[this.version] = body;
|
||||||
setTimeout(() => { this.version = null; }, 3.6e+6);
|
setTimeout(() => { this.version = null; }, 3.6e+6);
|
||||||
return body;
|
return body;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "91.0.1",
|
"version": "91.0.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user