You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Kaisarion
One possible solution to this issue would be to organize the commands into different categories or modules, and then import each module separately. This would make the code more organized and easier to read and maintain. For example:
// Chat Commands
import * as chatCommands from './chat-commands';
// Message Context Commands
import * as messageCommands from './message-commands';
// User Context Commands
import * as userCommands from './user-commands';
// Message Context Commands
...messageCommands.all,
// User Context Commands
...userCommands.all,
// TODO: Add new commands here
];
Alternatively, you could use an object to store the commands, where the keys represent the different categories or modules and the values are arrays of commands. This would allow you to easily access and use the commands in different parts of your code.
start-bot.ts requires the importation of command classes through the index.ts.
then, there is a command array created:
You can see the problem if we have over 100 commands, the file would turn into 400-500 lines easily.
Any future dynamic solution to this? It leaves our hands tied.
The text was updated successfully, but these errors were encountered: