Added initial layout files, data sources, and types/settings/etc.
This commit is contained in:
parent
1d949f6e2a
commit
59d6e2940a
2460 changed files with 3466 additions and 0 deletions
43
cmd/bot/main.go
Normal file
43
cmd/bot/main.go
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "os"
|
||||
_ "os/signal"
|
||||
|
||||
"github.com/go-telegram/bot"
|
||||
"github.com/go-telegram/bot/models"
|
||||
|
||||
"fmt"
|
||||
"git.destrealm.net/zancarius/justusbot/internal/bible"
|
||||
)
|
||||
|
||||
// Send any text message to the bot after the bot has been started
|
||||
|
||||
func main() {
|
||||
/*ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer cancel()
|
||||
|
||||
opts := []bot.Option{
|
||||
bot.WithDefaultHandler(handler),
|
||||
}
|
||||
|
||||
b, err := bot.New(os.Getenv("TOKEN"), opts...)
|
||||
if nil != err {
|
||||
// panics for the sake of simplicity.
|
||||
// you should handle this error properly in your code.
|
||||
panic(err)
|
||||
}
|
||||
|
||||
b.Start(ctx)*/
|
||||
fmt.Println(bible.FindAlias("mat"))
|
||||
}
|
||||
|
||||
func handler(ctx context.Context, b *bot.Bot, update *models.Update) {
|
||||
/*if update.Message != nil {
|
||||
b.SendMessage(ctx, &bot.SendMessageParams{
|
||||
ChatID: update.Message.Chat.ID,
|
||||
Text: update.Message.Text,
|
||||
})
|
||||
}*/
|
||||
}
|
||||
Loading…
Reference in a new issue