mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 06:34: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;
|
if (guild.id === "568120814776614924") return;
|
||||||
|
|
||||||
guild = await guild.fetch();
|
guild = await guild.fetch();
|
||||||
const channel = guild.channels.cache.get(guild?.data.plugins.news);
|
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) return;
|
|
||||||
|
|
||||||
if (!channel && important) {
|
channel.send({
|
||||||
guild.channels.cache.find(c => c.isTextBased()).send({
|
|
||||||
content: `${interaction.options.getBoolean("tag") ? "||@everyone|| " : ""}ВАЖНОЕ ОБЪЯВЛЕНИЕ!`,
|
|
||||||
embeds: [embed],
|
|
||||||
});
|
|
||||||
} else if (channel) channel.send({
|
|
||||||
content: `${interaction.options.getBoolean("tag") ? "||@everyone|| " : ""}ВАЖНОЕ ОБЪЯВЛЕНИЕ!`,
|
content: `${interaction.options.getBoolean("tag") ? "||@everyone|| " : ""}ВАЖНОЕ ОБЪЯВЛЕНИЕ!`,
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue