Skip to content

Commit fd5d031

Browse files
committed
climate daily
1 parent 677ccdc commit fd5d031

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Slash/day.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const { SlashCommandBuilder } = require("@discordjs/builders");
2+
const { dayNews } = require("../service/dayNews");
3+
4+
module.exports = {
5+
data: new SlashCommandBuilder()
6+
.setName("dia")
7+
.setDescription("envia tudo do dia"),
8+
async execute(interaction) {
9+
let guildID = await interaction.client.guilds.fetch(process.env.GUILD);
10+
let channeldia = await guildID.channels.fetch(process.env.DIA);
11+
let channellove = await guildID.channels.fetch(process.env.LOVE);
12+
let channeldolar = await guildID.channels.fetch(process.env.DOLAR);
13+
let channelClimate = await guildID.channels.fetch(process.env.CLIMA);
14+
try {
15+
dayNews(channellove, channeldia, channeldolar, channelClimate);
16+
return interaction.reply("Pronto");
17+
} catch (error) {
18+
return interaction.reply("Erro");
19+
}
20+
},
21+
};

0 commit comments

Comments
 (0)