Skip to content
This repository has been archived by the owner on May 21, 2023. It is now read-only.

Commit

Permalink
update dialogflowapi
Browse files Browse the repository at this point in the history
  • Loading branch information
catusax committed Mar 19, 2019
1 parent c33adcc commit 5eed1a3
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 83 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ docker run -itd --restart=always --name tgbot -p 8443:8443 \
-v $PWD/conf:/bot/conf \
coolrc/tgbot
```

# TODO

[] 增加语音支持
5 changes: 4 additions & 1 deletion conf/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"hook": "https://bot.coolrc.me:8443/",
"token": "775353elKLd9XXhT-BN7GnPjc",
"tuling": "1cac81900f8e16b079"
"tuling": "1cac81900f8e16b079",
"projectid": "newagent-8c7ad",
"jsonfile": "conf/newagent-8c7ad-b39848d5c5ce.json",
"lang": "zh-CN"
}

16 changes: 10 additions & 6 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import (
)

type Conf struct {
Hook string `json:"hook"`
Token string `json:"token"`
Tuling string `json:"tuling"`
Hook string `json:"hook"`
Token string `json:"token"`
Tuling string `json:"tuling"`
Projectid string `json:"projectid"`
Jsonfile string `json:"jsonfile"`
Lang string `json:"lang"`
}

var Token string
var Webhook string
var Tuling_token string
var Token, Webhook, Tuling_token, Projectid, Jsonfile, Lang string

func ReadConf() {
var Config Conf
Expand All @@ -32,4 +33,7 @@ func ReadConf() {
Token = Config.Token
Webhook = Config.Hook
Tuling_token = Config.Tuling
Projectid = Config.Projectid
Jsonfile = Config.Jsonfile
Lang = Config.Lang
}
Loading

0 comments on commit 5eed1a3

Please sign in to comment.