diff --git a/Shard.js b/Shard.js index a04e0910..b8f984ba 100644 --- a/Shard.js +++ b/Shard.js @@ -6,7 +6,7 @@ const manager = new ShardingManager(path.join(__dirname, 'XiaoBot.js'), { token: manager.spawn(undefined, 1000); setInterval(async () => { - if (!manager.shards.get(0)) return; + if (!manager.shards.has(0)) return; const guilds = await manager.fetchClientValues('guilds.size'); const count = guilds.reduce((prev, val) => prev + val, 0); postStats(count, await manager.shards.get(0).fetchClientValue('user.id')); diff --git a/commands/games/whos-that-pokemon.js b/commands/games/whos-that-pokemon.js index 403f15ce..057a63e8 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/games/whos-that-pokemon.js @@ -36,6 +36,7 @@ module.exports = class WhosThatPokemonCommand extends Command { const base = await loadImage(image.body); const canvas = createCanvas(base.width, base.height); const ctx = canvas.getContext('2d'); + ctx.drawImage(base, 0, 0); silhouette(ctx, 0, 0, base.width, base.height); attachment = canvas.toBuffer(); }