AlexzanderFlores / WOKCommands

130 stars 61 forks source link

Check if slash command was called from DM #106

Open karelkryda opened 3 years ago

karelkryda commented 3 years ago

Hi, how can I check if slash command was called from DM or from server? I need to set some slash commands to work only on servers and not in DMs. Thanks

KartikeSingh commented 3 years ago

well there are various ways like ,

callback({channel,interaction}) =>{ if(!channel.guild) // means it is in dm if(!interaction.guild) // means it is in dm }

tippfehlr commented 2 years ago

There is a guildOnly attribute within an ICommand

tippfehlr commented 2 years ago

Close?