Skip to content
This repository has been archived by the owner on Jan 30, 2022. It is now read-only.

Commit

Permalink
blurple fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Jun 8, 2021
1 parent 5e533b5 commit 2608c4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmds/blurple.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const checkUrl = async (url) => {
}

module.exports = {
name: "blurpletest",
name: "blurple",
description: "Discord Brand Filters",
expectedArgs: [
{
Expand Down Expand Up @@ -122,7 +122,7 @@ module.exports = {
let theURL = args[1];
let isGif = false;
if (memberFromArgs) {
theURL = member.user.displayAvatarURL({ size: 4096, format: "png" });
theURL = memberFromArgs.user.displayAvatarURL({ size: 4096, format: "png" });

if (await checkUrl(memberFromArgs.user.displayAvatarURL({ size: 4096, format: "gif" }))) {
isGif = true;
Expand Down
7 changes: 3 additions & 4 deletions cmds/blurpletest.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ module.exports = {
if (args[0] && args[1]) {
respond("Your Image is loading!")

let memberFromArgs = guild.members.cache.get(args[1].replace(/[!@<>]/g, ''));
let memberFromArgs = guild.members.cache.get(args[1], '');

let theURL = args[1];
let isGif = false;
if (memberFromArgs) {
theURL = member.user.displayAvatarURL({ size: 4096, format: "png" });
theURL = memberFromArgs.user.displayAvatarURL({ size: 4096, format: "png" });

if (await checkUrl(memberFromArgs.user.displayAvatarURL({ size: 4096, format: "gif" }))) {
isGif = true;
Expand Down Expand Up @@ -214,9 +214,8 @@ module.exports = {

edit({
content: `Your Image is ready! <@${member.user.id}>`,
attachments: new MessageAttachment(blurpled, `${args[0]}.gif`)
attachments: new MessageAttachment(blurpled, `${args[0]}.png`)
}).catch(e => {
console.log(e)
edit(`Image has more than 8 mb. <@${member.user.id}>`)
});
}
Expand Down

0 comments on commit 2608c4a

Please sign in to comment.