mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 16:28:26 +00:00
Added embeds to images, and fixes to it
This commit is contained in:
parent
c347689ea3
commit
01a57a491b
26 changed files with 71 additions and 68 deletions
|
|
@ -35,7 +35,7 @@
|
|||
"canvacord": "^5.4.8",
|
||||
"chalk": "^4.1.2",
|
||||
"discord-giveaways": "^6.0.1",
|
||||
"discord-image-generation": "^1.4.15",
|
||||
"discord-image-generation": "^1.4.21",
|
||||
"discord.js": "^14.7.1",
|
||||
"dompurify": "^2.4.1",
|
||||
"dotenv": "^16.0.3",
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const image = await pop.ad(userAvatar);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "ad.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
|
||||
}
|
||||
|
||||
const embed = client.templateEmbed().setImage("attachment://ad.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
|
@ -5,11 +5,12 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const img = await Canvas.bed(interaction.user.avatarURL({ size: 1024, format: 'png' }), userAvatar);
|
||||
const img = await Canvas.bed(interaction.user.avatarURL({ size: 1024, extension: 'png' }), userAvatar);
|
||||
|
||||
let attach = new Discord.AttachmentBuilder(img, { name: "bed.png" });
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://bed.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const lvl = 4
|
||||
|
||||
const img = await Canvas.blur(userAvatar, lvl)
|
||||
|
||||
let attach = new Discord.AttachmentBuilder(img, { name: "blurred.png" });
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://blurred.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const lvl = 4
|
||||
|
||||
const img = await Canvas.burn(userAvatar, lvl);
|
||||
|
||||
let attach = new Discord.AttachmentBuilder(img, { name: "blurred.png" });
|
||||
interaction.editReply({ files: [attach] })
|
||||
let attach = new Discord.AttachmentBuilder(img, { name: "burn.png" });
|
||||
const embed = client.templateEmbed().setImage("attachment://burn.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ module.exports = async (client, interaction, args) => {
|
|||
const image = await pop.car();
|
||||
let attach = new Discord.AttachmentBuilder(image.image, { name: "car.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://car.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
};
|
||||
|
|
@ -5,11 +5,12 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const image = await pop.clown(userAvatar);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "clown.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://clown.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const attachment = new Discord.AttachmentBuilder(image, "clyde.png");
|
||||
|
||||
interaction.editReply({ files: [attachment] });
|
||||
const embed = client.templateEmbed().setImage("attachment://clyde.png");
|
||||
interaction.editReply({ files: [attachment], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -5,11 +5,12 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const image = await Canvas.colorfy(userAvatar, "#ff0000")
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "colorify.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://colorify.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const amount = 60
|
||||
|
||||
const image = await Canvas.darkness(userAvatar, amount);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "blurred.gif" });
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "darkness.gif" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://darkness.gif");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ module.exports = async (client, interaction, args) => {
|
|||
const image = await pop.drake(splitArgs1, splitArgs2);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "drake.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://drake.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const image = await Canvas.facepalm(userAvatar);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "facepalm.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://facepalm.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@ const Discord = require('discord.js');
|
|||
|
||||
module.exports = async (client, interaction, args) => {
|
||||
|
||||
let link = `https://some-random-api.ml/canvas/glass/?avatar=${interaction.user.avatarURL({ size: 1024, format: 'png' })}`
|
||||
let link = `https://some-random-api.ml/canvas/glass/?avatar=${interaction.user.avatarURL({ size: 1024, extension: 'png' })}`
|
||||
const attachment = new Discord.AttachmentBuilder(link, {name:'glass.png'});
|
||||
|
||||
interaction.editReply({ files: [attachment] })
|
||||
const embed = client.templateEmbed().setImage("attachment://glass.png");
|
||||
interaction.editReply({ files: [attachment], embeds: [embed] });
|
||||
};
|
||||
|
|
@ -4,12 +4,13 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const image = await Canvas.greyscale(userAvatar)
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "greyscale.png" });
|
||||
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed();
|
||||
embed.setImage("attachment://greyscale.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ module.exports = async (client, interaction, args) => {
|
|||
client.simpleEmbed({
|
||||
image: `${image}`
|
||||
}, channel)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -5,11 +5,11 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
|
||||
const image = await pop.invert(userAvatar);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "invert.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage('attachment://invert.png')
|
||||
interaction.editReply({ files: [attach], embeds: [embed] })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
const member = interaction.options.getUser('user');
|
||||
|
||||
let avatar = interaction.user.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const avatar = interaction.user.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
const userAvatar = member.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
const image = await new DIG.Kiss().getImage(avatar, userAvatar);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "kiss.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed();
|
||||
embed.setImage('attachment://kiss.png')
|
||||
embed.setDescription(`**${interaction.user.username}** kissed **${member.username}**`)
|
||||
interaction.editReply({ files: [attach], embeds: [embed] })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
var img = await new DIG.Podium().getImage(user1Avatar, user2Avatar, user3Avatar, user1.tag, user2.tag, user3.tag);
|
||||
var attach = new Discord.AttachmentBuilder(img, { name: "podium.png" });
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://podium.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ module.exports = async (client, interaction, args) => {
|
|||
const image = await pop.pooh(splitArgs1, splitArgs2);
|
||||
let attach = new Discord.AttachmentBuilder(image, { name: "pooh.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
|
||||
const embed = client.templateEmbed().setImage("attachment://pooh.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@ const DIG = require("discord-image-generation");
|
|||
module.exports = async (client, interaction, args) => {
|
||||
const user = interaction.options.getUser('user') || interaction.user;
|
||||
|
||||
let avatar = interaction.user.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
const userAvatar = user.displayAvatarURL({ dynamic: false, size: 1024, format: 'png' });
|
||||
let avatar = interaction.user.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
const userAvatar = user.displayAvatarURL({ dynamic: false, size: 1024, extension: 'png' });
|
||||
const image = await new DIG.Spank().getImage(avatar, userAvatar);
|
||||
let attach = new Discord.AttachmentBuilder(image, {name: "spank.png"});
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://spank.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2,8 +2,9 @@ const Discord = require('discord.js');
|
|||
|
||||
module.exports = async (client, interaction, args) => {
|
||||
|
||||
let link = `https://some-random-api.ml/canvas/triggered/?avatar=${interaction.user.avatarURL({ size: 1024, format: 'png' })}`
|
||||
let link = `https://some-random-api.ml/canvas/triggered/?avatar=${interaction.user.avatarURL({ size: 1024, extension: 'png' })}`
|
||||
const attachment = new Discord.AttachmentBuilder(link, { name: 'triggered.gif' });
|
||||
|
||||
interaction.editReply({ files: [attachment] })
|
||||
const embed = client.templateEmbed().setImage("attachment://triggered.gif");
|
||||
interaction.editReply({ files: [attachment], embeds: [embed] });
|
||||
};
|
||||
|
|
@ -1,16 +1,9 @@
|
|||
const hdqwalls = require("hdqwalls-wrapper");
|
||||
|
||||
const fetch = require("node-fetch")
|
||||
module.exports = async (client, interaction, args) => {
|
||||
|
||||
var images = []
|
||||
const query = interaction.options.getString('name');
|
||||
|
||||
const image = await hdqwalls(query);
|
||||
|
||||
client.embed({
|
||||
title: `🖼・Your wallpaper`,
|
||||
image: image[0],
|
||||
type: 'editreply'
|
||||
}, interaction)
|
||||
// Use FREE API
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -4,10 +4,10 @@ const DIG = require("discord-image-generation");
|
|||
module.exports = async (client, interaction, args) => {
|
||||
const user = interaction.options.getUser('user') || interaction.user;
|
||||
|
||||
let userAvatar = user.displayAvatarURL({ size: 1024, dynamic: false, format: 'png' });
|
||||
let userAvatar = user.displayAvatarURL({ size: 1024, dynamic: false, extension: 'png' });
|
||||
let img = await new DIG.Wanted().getImage(userAvatar, `€`);
|
||||
let attach = new Discord.AttachmentBuilder(img, { name: "wanted.png" });
|
||||
|
||||
interaction.editReply({ files: [attach] })
|
||||
const embed = client.templateEmbed().setImage("attachment://wanted.png");
|
||||
interaction.editReply({ files: [attach], embeds: [embed] });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = async (client, interaction, args) => {
|
||||
|
||||
let link = `https://some-random-api.ml/canvas/wasted/?avatar=${interaction.user.avatarURL({ size: 1024, format: 'png' })}`
|
||||
let link = `https://some-random-api.ml/canvas/wasted/?avatar=${interaction.user.avatarURL({ size: 1024, extension: 'png' })}`
|
||||
|
||||
client.embed({
|
||||
title: `🖼・Generated image`,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ module.exports = async (client, interaction, args) => {
|
|||
let xpRequired = client.xpFor(user.level + 1);
|
||||
|
||||
const rankCard = new Canvacord.Rank()
|
||||
.setAvatar(target.displayAvatarURL({ dynamic: false, format: 'png' }))
|
||||
.setAvatar(target.displayAvatarURL({ dynamic: false, extension: 'png' }))
|
||||
.setRequiredXP(xpRequired)
|
||||
.setCurrentXP(user.xp)
|
||||
.setLevel(user.level)
|
||||
|
|
|
|||
|
|
@ -3,15 +3,10 @@ const Discord = require('discord.js');
|
|||
const Schema = require("../../database/models/stats");
|
||||
|
||||
module.exports = async (client, interaction, args) => {
|
||||
let Emojis = "";
|
||||
let EmojiCount = 0;
|
||||
let Animated = 0;
|
||||
let OverallEmojis = 0;
|
||||
|
||||
function Emoji(id) {
|
||||
return client.emojis.cache.get(id).toString();
|
||||
}
|
||||
|
||||
interaction.guild.emojis.cache.forEach((emoji) => {
|
||||
OverallEmojis++;
|
||||
if (emoji.animated) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue