add /start command

This commit is contained in:
c9s 2021-11-25 11:52:14 +08:00
parent 8acc2cd87f
commit 6326d52c1b

View File

@ -57,6 +57,7 @@ func NewInteraction(bot *telebot.Bot, store service.Store) *Interaction {
bot.Handle("/auth", interaction.HandleAuth)
bot.Handle("/info", interaction.HandleInfo)
bot.Handle("/subscribe", interaction.HandleSubscribe)
bot.Handle("/start", interaction.HandleStart)
return interaction
}
@ -68,6 +69,10 @@ func (it *Interaction) Session() *Session {
return it.session
}
func (it *Interaction) HandleStart(m *telebot.Message) {
it.HandleSubscribe(m)
}
func (it *Interaction) HandleSubscribe(m *telebot.Message) {
if it.session == nil {
return