This commit is contained in:
3
internal/configs/version.go
Normal file
3
internal/configs/version.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package configs
|
||||
|
||||
var Version = "2"
|
||||
@@ -31,7 +31,7 @@ func setupCommands(b *telebot.Bot) error {
|
||||
b.Handle("/start", commands.OnStart)
|
||||
|
||||
//general
|
||||
b.Handle("/ip", commands.OnGetIp)
|
||||
b.Handle("/v", commands.OnGetVersion)
|
||||
|
||||
//info
|
||||
b.Handle("/p", commands.OnGetTopPrices)
|
||||
|
||||
@@ -2,11 +2,13 @@ package commands
|
||||
|
||||
import (
|
||||
"gopkg.in/telebot.v3"
|
||||
"me.thuanle/bbot/internal/configs"
|
||||
"me.thuanle/bbot/internal/services/tele/chat"
|
||||
"me.thuanle/bbot/internal/utils/netx"
|
||||
)
|
||||
|
||||
func OnGetIp(context telebot.Context) error {
|
||||
func OnGetVersion(context telebot.Context) error {
|
||||
ip := netx.GetPublicIp()
|
||||
return chat.ReplyMessageCode(context, ip)
|
||||
msg := "v" + configs.Version + " - " + ip
|
||||
return chat.ReplyMessageCode(context, msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user