@@ -90,22 +90,22 @@ type BotMessage struct {
90
90
// ----------------------------------------------------------------------------
91
91
// get config
92
92
func getConfig () (commands Commands , appConfig Config , err error ) {
93
- flag .StringVar (& appConfig .token , "tb-token" , "" , "setting bot token (or set TB_TOKEN variable)" )
93
+ flag .StringVar (& appConfig .token , "tb-token" , "" , "setting bot ` token` (or set TB_TOKEN variable)" )
94
94
flag .BoolVar (& appConfig .addExit , "add-exit" , false , "adding \" /shell2telegram exit\" command for terminate bot (for roots only)" )
95
- flag .IntVar (& appConfig .botTimeout , "timeout" , DefaultBotTimeout , "setting timeout for bot" )
96
- flag .StringVar (& appConfig .bindAddr , "bind-addr" , "" , "bind address to listen webhook requests, like: 0.0.0.0:8080" )
97
- flag .Var (& urlValue {& appConfig .webhookURL }, "webhook" , "url of bot's webhook" )
95
+ flag .IntVar (& appConfig .botTimeout , "timeout" , DefaultBotTimeout , "setting timeout for bot (in `seconds`) " )
96
+ flag .StringVar (& appConfig .bindAddr , "bind-addr" , "" , "bind address to listen webhook requests, like: ` 0.0.0.0:8080` " )
97
+ flag .Var (& urlValue {& appConfig .webhookURL }, "webhook" , "` url` of bot's webhook" )
98
98
flag .BoolVar (& appConfig .allowAll , "allow-all" , false , "allow all users (DANGEROUS!)" )
99
99
flag .BoolVar (& appConfig .logCommands , "log-commands" , false , "logging all commands" )
100
100
flag .StringVar (& appConfig .description , "description" , "" , "setting description of bot" )
101
101
flag .BoolVar (& appConfig .persistentUsers , "persistent-users" , false , "load/save users from file (default ~/.config/shell2telegram.json)" )
102
- flag .StringVar (& appConfig .usersDB , "users-db" , "" , "file for store users" )
103
- flag .IntVar (& appConfig .cache , "cache" , 0 , "caching command out (in seconds)" )
102
+ flag .StringVar (& appConfig .usersDB , "users-db" , "" , "` file` for store users" )
103
+ flag .IntVar (& appConfig .cache , "cache" , 0 , "caching command out (in ` seconds` )" )
104
104
flag .BoolVar (& appConfig .isPublicBot , "public" , false , "bot is public (don't add /auth* commands)" )
105
- flag .IntVar (& appConfig .shTimeout , "sh-timeout" , 0 , "set timeout for execute shell command (in seconds)" )
105
+ flag .IntVar (& appConfig .shTimeout , "sh-timeout" , 0 , "set timeout for execute shell command (in ` seconds` )" )
106
106
flag .StringVar (& appConfig .shell , "shell" , "sh" , "custom shell or \" \" for execute without shell" )
107
107
flag .BoolVar (& appConfig .oneThread , "one-thread" , false , "run each shell command in one thread" )
108
- logFilename := flag .String ("log" , "" , "log filename, default - STDOUT" )
108
+ logFilename := flag .String ("log" , "" , "log ` filename` , default - STDOUT" )
109
109
predefinedAllowedUsers := flag .String ("allow-users" , "" , "telegram users who are allowed to chat with the bot (\" user1,user2\" )" )
110
110
predefinedRootUsers := flag .String ("root-users" , "" , "telegram users, who confirms new users in their private chat (\" user1,user2\" )" )
111
111
version := flag .Bool ("version" , false , "get version" )
0 commit comments