#help please

1 messages · Page 1 of 1 (latest)

gloomy violet
#

help here

#
module.exports = {
    data: new SlashCommandBuilder()
    .setName('getscript')
    .setDescription('Sends u a script'),
    async execute(message, args) {
        if (message.member.roles.cache.has('993934152095244418')){
            message.author.send('hey')
        } else {
            message.channel.send('U do not have permission to use this command, Please buy and try again after')
        }
    }
}
uncut pumice
#

that is how you send a dm, if it doesn't catch the promise rejection gracefully, presumably the user's settings prevent it from sending

#

make sure that piece of code executes in the first place

gloomy violet
#

wdym

#

ima watch video

muted stream
#

is message actually a Message? the data property is a slash command builder

gloomy violet
#

its not a message

#

its slash commands

muted stream
#

message.user.send()

gloomy violet
#

ill try that

muted stream
#

if you're getting errors you should have provided them

gloomy violet
#

worked

#

but why is it sending this?

muted stream
#

you're not replying to the interaction

gloomy violet
#

what that mean?

#

its not logging anything

muted stream
gloomy violet
#

ok thanks

#

so what am i learning ffom this again?

#

ohhh'

#

ok it worked