Skip to content

Commit

Permalink
✨ Add some images
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Apr 6, 2021
1 parent bbe3624 commit fc615f9
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 79 deletions.
35 changes: 35 additions & 0 deletions commands/Images/approved.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class Approved extends Command {
constructor (client) {
super(client, {
name: "batslap",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const user = await this.client.resolveUser(args[0]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("approved", { url: user.displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "approved.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = Approved;
38 changes: 38 additions & 0 deletions commands/Images/batslap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class BatSlap extends Command {
constructor (client) {
super(client, {
name: "batslap",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const users = [
await this.client.resolveUser(args[0]) || message.author,
await this.client.resolveUser(args[1]) || message.author
];
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("batslap", { avatar: users[0].displayAvatarURL({ format: "png", size: 512 }), url: users[1].displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "batslap.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = BatSlap;
35 changes: 35 additions & 0 deletions commands/Images/beautiful.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class Beautiful extends Command {
constructor (client) {
super(client, {
name: "beautiful",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const user = await this.client.resolveUser(args[0]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("beautiful", { url: user.displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "beautiful.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = Beautiful;
35 changes: 35 additions & 0 deletions commands/Images/brazzers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class Brazzers extends Command {
constructor (client) {
super(client, {
name: "brazzers",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const user = await this.client.resolveUser(args[0]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("brazzers", { url: user.displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "brazzers.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = Brazzers;
35 changes: 35 additions & 0 deletions commands/Images/burn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class Burn extends Command {
constructor (client) {
super(client, {
name: "burn",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const user = await this.client.resolveUser(args[0]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("burn", { url: user.displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "burn.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = Burn;
35 changes: 35 additions & 0 deletions commands/Images/challenger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class Challenger extends Command {
constructor (client) {
super(client, {
name: "challenger",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const user = await this.client.resolveUser(args[0]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("challenger", { url: user.displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "challenger.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = Challenger;
35 changes: 35 additions & 0 deletions commands/Images/dictator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");

class Dictator extends Command {
constructor (client) {
super(client, {
name: "dictator",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: [],
memberPermissions: [],
botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ],
nsfw: false,
ownerOnly: false,
cooldown: 5000
});
}

async run (message, args) {

const user = await this.client.resolveUser(args[0]) || message.author;
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const buffer = await this.client.AmeAPI.generate("dictator", { url: user.displayAvatarURL({ format: "png", size: 512 }) });
const attachment = new Discord.MessageAttachment(buffer, "dictator.png");
m.delete();
message.channel.send(attachment);

}

}

module.exports = Dictator;
30 changes: 15 additions & 15 deletions commands/Images/tweet.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js"),
fetch = require("node-fetch");
Discord = require("discord.js");

class Tweet extends Command {

Expand All @@ -21,7 +20,7 @@ class Tweet extends Command {

async run (message, args) {

const user = args[0];
const user = message.mentions.users.first() || message.author;
const text = args.slice(1).join(" ");

if(!user){
Expand All @@ -36,18 +35,19 @@ class Tweet extends Command {
prefixEmoji: "loading"
});

try {
const res = await fetch(encodeURI(`https://nekobot.xyz/api/imagegen?type=tweet&username=${user}&text=${text}`));
const json = await res.json();
const attachment = new Discord.MessageAttachment(json.message, "tweet.png");
message.channel.send(message.translate("images/tweet:SUCCESS", {
user
}), attachment);
m.delete();
} catch(e){
console.log(e);
m.error("misc:ERROR_OCCURRED", null, false, false, true);
}
await message.guild.members.fetch();
const randomMembers = message.guild.members.cache.random(3);

const buffer = await this.client.AmeAPI.generate("twitter", {
url: user.displayAvatarURL(),
avatar1: randomMembers[0].user.displayAvatarURL(),
avatar2: randomMembers[1].user.displayAvatarURL(),
avatar3: randomMembers[2].user.displayAvatarURL(),
text
});
const attachment = new Discord.MessageAttachment(buffer, "twitter.png");
m.delete();
message.channel.send(attachment);

}

Expand Down
Loading

0 comments on commit fc615f9

Please sign in to comment.