fiatrete / OpenDAN-Personal-AI-OS

OpenDAN is an open source Personal AI OS , which consolidates various AI modules in one place for your personal use.
https://opendan.ai
MIT License
1.67k stars 137 forks source link

Error of telegram bot #89

Closed alexsunxl closed 10 months ago

alexsunxl commented 11 months ago

After I connect a telegram bot,and input the bot token. I try to send a message in telegram,but got a error below. So I feel that the configuration and use of this telegram are not very clear now.

[2023-10-31 15:39:57,725]aios_kernel.tg_tunnel[INFO]: on_message: 27 from sunxinle (sunxinle) to None(5577362278)
[2023-10-31 15:39:57,725]aios_kernel.tg_tunnel[ERROR]: tg_tunnel error:cannot access local variable 'contact' where it is not associated with a value
[2023-10-31 15:39:59,076]httpx[INFO]: HTTP Request: POST https://api.telegram.org/*********/getUpdates "HTTP/1.1 200 OK"
[2023-10-31 15:39:59,077]aios_kernel.tg_tunnel[INFO]: on_message: 27 from sunxinle (sunxinle) to None(5577362278)
[2023-10-31 15:39:59,077]aios_kernel.tg_tunnel[WARNING]: ignore message from telegram bot 5577362278
waterflier commented 11 months ago

I've identified an issue related to permission control, which is causing some problems. However, the error messages currently provided are not explicit enough to help users understand the issue. I plan to address this in the near future.

The code related to this issue is relatively simple. If anyone could assist me in resolving this, I would greatly appreciate it.

Looking forward to your support.

smarath3 commented 10 months ago

Hello, I can help if needed. But tried to recreate the issue above, I typed TG bot token and entered 'contact', and everything works very well! Jarvis responds well for my queries from TG bot. Is the issue resolved? Let me know how else can I help.

alexsunxl commented 10 months ago

This works @smarath3