diff --git a/db/db.go b/db/db.go index 13b6ca3..66c2ac5 100644 --- a/db/db.go +++ b/db/db.go @@ -57,7 +57,7 @@ func AddUserInChat(chatID int64, username string) error { _, err = collection.UpdateOne( ctx, bson.M{"chat_id": chatID}, - bson.M{"addToSet": bson.M{"users": username}}, + bson.M{"$addToSet": bson.M{"users": username}}, ) return err }