don't need to check twice

This commit is contained in:
Jonny_Bro (Nikita) 2024-06-18 17:34:47 +05:00
parent 74e97e9ccc
commit d57cc7145d
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8

View file

@ -10,7 +10,7 @@ module.exports.init = async client => {
const guildData = await client.getGuildData(guild.id); const guildData = await client.getGuildData(guild.id);
const channel = guildData.plugins.birthdays ? await client.channels.fetch(guildData.plugins.birthdays) : null; const channel = guildData.plugins.birthdays ? await client.channels.fetch(guildData.plugins.birthdays) : null;
if (guildData.plugins.birthdays && channel) { if (channel) {
const date = new Date(), const date = new Date(),
currentDay = date.getDate(), currentDay = date.getDate(),
currentMonth = date.getMonth() + 1, currentMonth = date.getMonth() + 1,
@ -70,7 +70,7 @@ module.exports.run = async client => {
const guildData = await client.getGuildData(guild.id); const guildData = await client.getGuildData(guild.id);
const channel = guildData.plugins.birthdays ? await client.channels.fetch(guildData.plugins.birthdays) : null; const channel = guildData.plugins.birthdays ? await client.channels.fetch(guildData.plugins.birthdays) : null;
if (guildData.plugins.birthdays && channel) { if (channel) {
const date = new Date(), const date = new Date(),
currentDay = date.getDate(), currentDay = date.getDate(),
currentMonth = date.getMonth() + 1, currentMonth = date.getMonth() + 1,