mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
упси
This commit is contained in:
parent
82b7423fa0
commit
5ee0774eeb
1 changed files with 2 additions and 8 deletions
|
@ -59,15 +59,9 @@ class Announcement extends BaseCommand {
|
|||
if (guild.id === "568120814776614924") return;
|
||||
|
||||
guild = await guild.fetch();
|
||||
const channel = guild.channels.cache.get(guild?.data.plugins.news);
|
||||
if (!channel && !important) return;
|
||||
const channel = important ? (guild?.data?.plugins.news ? guild.channels.cache.get(guild?.data?.plugins.news) : guild.channels.cache.find(c => c.isTextBased())) : guild.channels.cache.get(guild?.data?.plugins.news);
|
||||
|
||||
if (!channel && important) {
|
||||
guild.channels.cache.find(c => c.isTextBased()).send({
|
||||
content: `${interaction.options.getBoolean("tag") ? "||@everyone|| " : ""}ВАЖНОЕ ОБЪЯВЛЕНИЕ!`,
|
||||
embeds: [embed],
|
||||
});
|
||||
} else if (channel) channel.send({
|
||||
channel.send({
|
||||
content: `${interaction.options.getBoolean("tag") ? "||@everyone|| " : ""}ВАЖНОЕ ОБЪЯВЛЕНИЕ!`,
|
||||
embeds: [embed],
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue