mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
padStart instead of Util.pad
This commit is contained in:
@@ -39,7 +39,7 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
|
||||
return msg.say('Game could not be started...');
|
||||
}
|
||||
const players = await this.generatePlayers(awaitedPlayers);
|
||||
let czars = Array.from(players.values());
|
||||
const czars = Array.from(players.values());
|
||||
let winner = null;
|
||||
while (!winner) {
|
||||
const czar = czars[0];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { createCanvas, loadImage } = require('canvas');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { filterPkmn, pad } = require('../../util/Util');
|
||||
const { filterPkmn } = require('../../util/Util');
|
||||
const { silhouette } = require('../../util/Canvas');
|
||||
|
||||
module.exports = class WhosThatPokemonCommand extends Command {
|
||||
@@ -43,7 +43,7 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
||||
}
|
||||
const names = data.names.map(name => name.name.toLowerCase());
|
||||
const displayName = filterPkmn(data.names).name;
|
||||
const id = pad(data.id.toString(), '000');
|
||||
const id = data.id.toString().padStart(3, '0');
|
||||
const image = await snekfetch.get(`https://www.serebii.net/sunmoon/pokemon/${id}.png`);
|
||||
let attachment = image.body;
|
||||
if (hide) {
|
||||
|
||||
Reference in New Issue
Block a user