mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
This is a better way of reading profile pics
This commit is contained in:
@@ -24,7 +24,7 @@ module.exports = class YearsCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
|
||||
return message.say('This Command requires the `Attach Files` Permission.');
|
||||
const { user } = args;
|
||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||
const userAvatar = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
|
||||
let images = [];
|
||||
images.push(Jimp.read(userAvatar));
|
||||
images.push(Jimp.read('https://i.imgur.com/eScwGFS.png'));
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = class BeautifulCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
|
||||
return message.say('This Command requires the `Attach Files` Permission.');
|
||||
const { user } = args;
|
||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||
const userAvatar = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
|
||||
let images = [];
|
||||
images.push(Jimp.read(userAvatar));
|
||||
images.push(Jimp.read('https://i.imgur.com/OOQ9QwQ.jpg'));
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = class BobRossCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
|
||||
return message.say('This Command requires the `Attach Files` Permission.');
|
||||
const { user } = args;
|
||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||
const userAvatar = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
|
||||
const blank = new Jimp(600, 775, 0xFFFFFF);
|
||||
let images = [];
|
||||
images.push(Jimp.read(userAvatar));
|
||||
|
||||
@@ -25,7 +25,7 @@ module.exports = class RIPCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
|
||||
return message.say('This Command requires the `Attach Files` Permission.');
|
||||
const { user } = args;
|
||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||
const userAvatar = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
|
||||
let images = [];
|
||||
images.push(Jimp.read(userAvatar));
|
||||
images.push(Jimp.read('https://i.imgur.com/KriteWm.jpg'));
|
||||
|
||||
@@ -25,7 +25,7 @@ module.exports = class SteamCardCommand extends Command {
|
||||
return message.say('This Command requires the `Attach Files` Permission.');
|
||||
const { user } = args;
|
||||
const username = message.guild ? message.guild.member(user).displayName : user.username;
|
||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||
const userAvatar = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
|
||||
const blank = new Jimp(494, 568, 0xFFFFFF);
|
||||
let images = [];
|
||||
images.push(Jimp.read(userAvatar));
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "15.4.5",
|
||||
"version": "16.0.1",
|
||||
"description": "A Discord Bot",
|
||||
"main": "shardingmanager.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user