trashIntent method
Trash an intent from the collection. If the intent is not collected, nothing will happen.
{name} is the name of the intent.
{botName} is the name of the bot that the intent belongs to. If not specified, the bot that is currently collected will be used.
Implementation
void trashIntent(String name, {String? botName}) {
if (botName == null && _bot == null) {
GetIt.I<BotnoiClient>().error.add(
"[collector.trashIntent] : A bot must be collected first or the botName must be specified");
return;
}
String key = "${botName ?? _bot?.botName}/$name";
_intents.remove(key);
}