ctucx.git: ctucxbot

[nimlang] A telegram bot

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
import os, json

proc tuwas() =
  let daten = parseJson(readFile("./data/db/ds100.json"))

  if daten.hasKey(paramStr(1)):
    let id = daten[paramStr(1)].getStr
    let stationsDaten = parseJson(readFile("./data/db/stations/" & id & ".json"))

    echo stationsDaten["name"]
    
  else:
    echo "hab ich nicht"

  



tuwas()