Skip to content

MarcoFierimonte/memory-gym-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Telegram BOT used to learn new english words. Link: https://telegram.me/MemoryGymBot

Developer Utils

USE MONGODB IMPORT FILE EXAMPLE

.\mongoimport.exe --uri "mongodb+srv://:@cluster0.n7aqfhp.mongodb.net" --db memory_gym_bot --collection init_dataset --jsonArray --drop --file ./initDataset.json

MONGO COMMANDS UTILS:

  • Add a new column to collection with default value:

db.getSiblingDB("memory_gym_bot").getCollection("dictionary").updateMany({}, {$set: {"frequency": 0}})

  • Example of pipeline operations with 1-->match,2-->find max of field,3-->get only 3 documents from previous results

db.getSiblingDB("memory_gym_bot").getCollection("dictionary").aggregate([ {'$match':{'chatId': 69501949 }}, { "$group": { "_id": null, "max": { "$max": "$frequency" } }}, {$sample:{size: 3 }} ])

POSTMAN COLLECTION FOR TESTING

Run in Postman

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published