UFO-Studios / AlienBot-Discord

The official Discord version of AlienBot
https://thealiendoctor.com/AddAlienBot
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Use interaction commands instead of message content. #3

Closed skyeredwood closed 2 years ago

skyeredwood commented 2 years ago

Your current code uses a . prefix for the bot. This is very bad practice for Discord application development, as Discord will soon be making message content a privileged intent at the end of next month, which means that it is going to become much more difficult to utilise & access. It's additionally so much easier to use interactions like slash commands, they have built-in UI functionality to make everything look cleaner as well.

If you'd like I can make a new branch of this and modify your existing code to use interactions instead, or there are some excellent docs for it at https://discordjs.guide/interactions/slash-commands.html (although you'd need to adapt the given code to meet your needs, however I have used a variation on this for many months and it's stood the test of time).

MDxWARRIORxOP commented 2 years ago

Hey abbysrc, we are using slash commands for everycommand that exists, we are not using any prefixed command. If you got that impression from the readme file, we are using the dots just as a bullet.

skyeredwood commented 2 years ago

Ah okay, my bad. Didn't look that deeply but it would be worth updating the README as it's quite confusing.

TheAlienDoctor commented 2 years ago

No worries, just updated it - thanks for pointing this out 👍