init code

This commit is contained in:
thuanle
2024-10-24 09:53:23 +07:00
parent a7559b3f9d
commit 92a63c7885
43 changed files with 1115 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package commands
import (
"gopkg.in/telebot.v3"
"me.thuanle/bbot/internal/services/controllers"
"me.thuanle/bbot/internal/services/tele/chat"
"me.thuanle/bbot/internal/services/tele/view"
)
func OnGetTopPrices(context telebot.Context) error {
sym, price, rate := controllers.GetTopPrices()
return chat.ReplyMessagePre(context, view.RenderOnGetTopPricesMessage(sym, price, rate))
}
func OnGetTopFundingFee(context telebot.Context) error {
fee, float64s, cds := controllers.GetTopFundingFee()
return chat.ReplyMessagePre(context, view.RenderOnGetTopFundingFeeMessage(fee, float64s, cds))
}