discord_bot/commands/help/announce.js

23 lines
829 B
JavaScript
Raw Permalink Normal View History

2024-02-07 14:45:57 +00:00
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)
}
}