m1guelpf / chatgpt-telegram

Run your own GPTChat Telegram bot, with a single command!
MIT License
3.9k stars 560 forks source link

feat: Allow multiple telegram IDs #52

Closed dhilman closed 1 year ago

dhilman commented 1 year ago

Moved to loading all of env file variables with viper. This provides the nice benefit of type support.

Updated existing config.Init to have a more explicit name and use an instance of viper rather than the global.

41

m1guelpf commented 1 year ago

Also, it is not super clear to me if this still allows leaving the ID field empty & specifying a single ID, could we get tests for those as well? :D

dhilman commented 1 year ago

Hey @m1guelpf, yeah good shout on both, moved to table tests as there are a few now. Action added 😉

Left the test action to run on ubuntu-latest only, think that is sufficient considering we build on other OSs. Lmk if you would rather have it run on all as well

kairin commented 1 year ago

Last login: Tue Dec 13 19:01:55 on ttys000 mini@Macs-Mac-mini ~ % /Users/mini/Applications/ChatGPT/chatgpt-telegram-Darwin-arm64/chatgpt-telegram ; exit; 2022/12/13 19:03:42 Started ChatGPT 2022/12/13 19:03:42 config file .env does not exist, using env variables 2022/12/13 19:03:42 Invalid .env config: TELEGRAM_TOKEN is not set

Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.

[Process completed]

i received the following error running on Mac Mini M1.

i am unsure how to troubleshoot it or what went wrong.

i have edited the env.example to env.env according to the instructions. also updated the .json file according to instructions.

xros commented 1 year ago

Last login: Tue Dec 13 19:01:55 on ttys000 mini@Macs-Mac-mini ~ % /Users/mini/Applications/ChatGPT/chatgpt-telegram-Darwin-arm64/chatgpt-telegram ; exit; 2022/12/13 19:03:42 Started ChatGPT 2022/12/13 19:03:42 config file .env does not exist, using env variables 2022/12/13 19:03:42 Invalid .env config: TELEGRAM_TOKEN is not set Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. [Process completed]

i received the following error running on Mac Mini M1.

i am unsure how to troubleshoot it or what went wrong.

i have edited the env.example to env.env according to the instructions. also updated the .json file according to instructions.

copy env.example to .env in the same folder.