Closed JohannSuarez closed 2 years ago
Further documentation about registering and replying to 'slash' commands assume the Client object listens for interaction events purely from index.js itself. However, they encourage decoupling events and commands from index.js as written here: https://discordjs.guide/creating-your-bot/event-handling.html#individual-event-files https://discordjs.guide/creating-your-bot/command-handling.html#reading-command-files
This article comes after https://discordjs.guide/interactions/replying-to-slash-commands.html#receiving-interactions.
Other devs have pointed out this inconsistency in the docs. See: https://github.com/discordjs/guide/issues/859
Temporary Solution: Make an exception for interactionCreate. Have it both explicitly written out in index.js, as well as be a .js in the events directory. There is no time left for a cleaner implementation.
Further documentation about registering and replying to 'slash' commands assume the Client object listens for interaction events purely from index.js itself. However, they encourage decoupling events and commands from index.js as written here: https://discordjs.guide/creating-your-bot/event-handling.html#individual-event-files https://discordjs.guide/creating-your-bot/command-handling.html#reading-command-files
This article comes after https://discordjs.guide/interactions/replying-to-slash-commands.html#receiving-interactions.
Other devs have pointed out this inconsistency in the docs. See: https://github.com/discordjs/guide/issues/859