File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ;
You can’t perform that action at this time.
0 commit comments