In an effort to provide regression testing for my pre-existing bot on Discord, I'm trying to create another bot that sends timed messages in order to test the original bot.
For example, I would type "!test" into Discord, and the Testing Bot would send "?start" into the chat. This should trigger the Original Bot and have it reply to the Testing Bot.
Unfortunately, my Original Bot was created using Discord-Commando. Although normal Discord.js allows for replies to bots (and even itself as far as I've discovered), Discord-Commando.js does not. At least, as far as my initial findings go.
I've scoured Google and Discord-Commando's documentation for examples of interactions between bots using Commando, but I couldn't find anything.
At most, I found that there is indeed a boolean flag in a bot's User object that identifies it as a bot (i.e. it has a boolean saying "bot: true") but that's about it. When trying to use methods in the Command object, none of them seem to trigger when the bot is given a command from another bot.
My ultimate question is that - is there a method that I could override that would allow my bots to essentially "talk" to each other while still using Discord-Commando? And if not, are there any recommendations on how to automate testing a Discord bot?
Aucun commentaire:
Enregistrer un commentaire