jaspermayone-archive / discord-bot

The open-source & multipurpose Discord bot with the goal to be the single needed bot for any server.
https://heptagrambotproject.com
Eclipse Public License 2.0
60 stars 32 forks source link

Guild Only Command Notification #169

Closed jaspermayone closed 3 years ago

jaspermayone commented 3 years ago

message to user if guild only command is ran in dm

slayer321 commented 3 years ago

Hello @j-dogcoder, I am new to the open-source community. I would like to take up this issue. Please brief me on the issue.

jaspermayone commented 3 years ago

Hey there @slayer321! We would love to have you contribute! Please check out our contributing guide.

jaspermayone commented 3 years ago

For this issue, Most commands have a property called "guild only". We want users to receive a message when they execute a guild only command in a DM.

slayer321 commented 3 years ago

Hey, @j-dogcoder I read contributing guide and also forked and done with all the installation and added the token and the bot is up and running. The bot is very Cool I liked it. This is the first time I'm working with the bot's so there are some doubts that I have. I check that some bot command has the property guild only which is set to false . From your this comment I have understood that you want the user to receive the message in their DM whenever they type the command which has the property guild only set as true is this what you want? like the !dadJoke command when the user will execute that command you want that the joke must be received to user's DM right ? and how can it be done?

jaspermayone commented 3 years ago

Hey @slayer321 , you could check out https://discordjs.guide/command-handling/adding-features.html#guild-only-commands for some more info.

jaspermayone commented 3 years ago

How's it going @slayer321?

slayer321 commented 3 years ago

Hey, @j-dogcoder what I have understood till now is that some command has the property guild only that needs to be set as true. And if the user will try to execute the command which is set as true in anyone's DM then the user will get some message saying you can't execute this command in DM, am I right? So how can it be implemented .... as I set the cat command to true and when I executed in bot's DM the command executed. I'm confused 😕

jaspermayone commented 3 years ago

Hey @slayer321, you are correct in the basics. The cat command shouldn’t be guild only. Things like kick and ban, however, should be guild only.

slayer321 commented 3 years ago

the guide only property for ban and kick are already set as true and whenever I'm trying to run that command this is what I'm getting there was an error trying to execute that command! Please contact a developer in our support server. So want to replace this message with some other message which will be sent to the user's DM whenever they are trying to run this command? this is what you want?

jaspermayone commented 3 years ago

That is correct

slayer321 commented 3 years ago

ok, so can you give me some reference on how can I implement it .. I searched it but found nothing useful. going to sleep will work on it tomorrow.

jaspermayone commented 3 years ago

I suggest you find an issue you know how to work on. If we guided everyone through every issue, that would be all we were doing.