discord_bot/commands/info-search/snupe.js

30 lines
817 B
JavaScript
Raw Normal View History

const Discord = require("discord.js")
const db = require("quick.db")
module.exports = {
name: "snipe",
aliases: ["ms", "messagesnipe"],
category: "info",
usage: "(prefix)snipe",
description: "Holen Sie sich die letzte gelöschte Nachricht mit Autor und Bild (falls vorhanden)",
run:async (client, message, args) => {
const msg = client.snipes.get(message.channel.id)
if(!msg) return message.channel.send("Es gibt nichts zu schnüffeln!")
const embed = new Discord.MessageEmbed()
.setAuthor(msg.author)
.setDescription(msg.content)
if(msg.image)embed
.setImage(msg.image)
.setColor("00FFFF")
.setTimestamp()
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
)
message.channel.send(embed)
}
}