23 lines
829 B
JavaScript
23 lines
829 B
JavaScript
|
const Discord = require ('discord.js')
|
||
|
const { MessageEmbed } = require('discord.js')
|
||
|
|
||
|
module.exports = {
|
||
|
name: "announce",
|
||
|
aliases: ["", "a"],
|
||
|
category: "moderation",
|
||
|
usage: "<text to say> einbetten",
|
||
|
description: "Gibt bereitgestellten Text im Embed-Formular zurück.",
|
||
|
run: async(client, message, args) => {
|
||
|
if(!message.member.hasPermission("ADMINISTRATION")) return message.channel.send(`SIE HABEN KEINE BERECHTIGUNG`)
|
||
|
await message.delete()
|
||
|
let say = message.content.split(" ").slice(1).join(" ")
|
||
|
if(!say) return message.channel.send(`❌ | `+"Ich kann keine leere Nachricht wiederholen")
|
||
|
let embed = new MessageEmbed()
|
||
|
.setAuthor(message.author.username, message.author.avatarURL())
|
||
|
.setDescription(`${say}`)
|
||
|
.setColor("RANDOM")
|
||
|
.setFooter(` ${message.guild}`)
|
||
|
.setTimestamp()
|
||
|
message.channel.send(embed)
|
||
|
}
|
||
|
}
|