fix(count-auto): load chats before counting

This commit is contained in:
Castor Regex 2025-08-24 13:14:48 -05:00 committed by Jeff Carr
parent 9c7d2a9c9e
commit 82eba977cd
1 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,9 @@ import (
) )
func doCountAuto() { func doCountAuto() {
if err := me.chats.ConfigLoad(); err != nil {
badExit(err)
}
count := 0 count := 0
for _, chat := range me.chats.GetChats() { for _, chat := range me.chats.GetChats() {
if strings.HasPrefix(chat.GetChatName(), "Auto ") { if strings.HasPrefix(chat.GetChatName(), "Auto ") {
@ -13,4 +16,4 @@ func doCountAuto() {
} }
} }
fmt.Println(count) fmt.Println(count)
} }