https://discord.gg/botpress logo
Greetings to all. I'm trying to get the current c...
# 💻developers
v
Greetings to all. I'm trying to get the current chatbot's name on an action card with this code, which was suggested by ChatGPT: let botId = event.botId let botInfo = await bp.bots.getBotById(botId); let botName = botInfo.name ; But I'm getting this error: Cannot find name 'bp' . (2304) I tried to find information about a 'bp' object, but found none. I found a 'bot' object in the API documentation (https://docs.botpress.cloud/docs/api-documentation/#schema_bot) that has properties such as id, name, and events. However, the following code: let botName = await bot.name; Causes this other error: Property 'name' does not exist on type 'BotVariab1es'. (2339) How could I get the name and other properties of the current chatbot? Thanks in advance.