other: the last moving to the best domain name damn it.

This commit is contained in:
Andrey Parhomenko 2024-05-15 22:41:53 +05:00
parent e119b75640
commit c576e891b8
9 changed files with 20 additions and 22 deletions

View file

@ -1,18 +1,18 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
"os"
)
var UsageAction = tg.Func(func(c tg.Context){
var UsageAction = tg.Func(func(c tg.Context) {
c.Sendf(
"There is no such command %q",
c.CallbackUpdate().Message.Command(),
)
})
var PreStartAction = tg.Func(func(c tg.Context){
var PreStartAction = tg.Func(func(c tg.Context) {
c.Sendf("Please, use /start ")
})
@ -25,7 +25,7 @@ var BotCommands = []tg.Command{
"info",
"info desc",
).WithAction(tg.Func(func(c tg.Context) {
c.SendfHTML(`<a href="https://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg">cock</a><strong>cock</strong> die`)
c.SendfHTML(`<a href="https://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg">cock</a><strong>cock</strong> die`)
})),
tg.NewCommand("hello", "sends the 'Hello, World!' message back").
WithAction(tg.Func(func(c tg.Context) {
@ -84,4 +84,3 @@ var BotCommands = []tg.Command{
)
})),
}

View file

@ -1,7 +1,7 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
"fmt"
)
@ -63,4 +63,3 @@ var IncDecWidget = tg.RenderFunc(func(c tg.Context) tg.UI {
),
}
})

View file

@ -1,7 +1,7 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
)
var HomeButton = tg.Buttonf("Home").Go("/")

View file

@ -1,7 +1,7 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
)
const (

View file

@ -4,7 +4,7 @@ import (
"log"
"os"
"vultras.su/core/tg"
"surdeus.su/core/tg"
)
type BotData struct {
@ -74,7 +74,7 @@ func main() {
log.Panic(err)
}
bot = bot.SetBehaviour(beh)
//SetDebug(true)
//SetDebug(true)
bot.SetData(&BotData{
Name: "Jay",

View file

@ -1,7 +1,7 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
"strings"
)
@ -44,10 +44,10 @@ func (w *MutateMessageCompo) Filter(u tg.Update) bool {
}
const (
UpperCasePath tg.Path = "upper-case"
LowerCasePath = "lower-case"
EscapePath = "escape"
MutateMessagesPath = "mutate-messages"
UpperCasePath tg.Path = "upper-case"
LowerCasePath = "lower-case"
EscapePath = "escape"
MutateMessagesPath = "mutate-messages"
)
var MutateMessagesWidget = tg.RenderFunc(func(c tg.Context) tg.UI {
@ -97,4 +97,3 @@ var MutateMessagesEscapeWidget = tg.RenderFunc(func(c tg.Context) tg.UI {
NewMutateMessageCompo(tg.Escape2),
}
})

View file

@ -1,7 +1,7 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
)
const (
@ -10,8 +10,8 @@ const (
var PanelWidget = tg.RenderFunc(func(c tg.Context) tg.UI {
var (
n = 0
ln = 4
n = 0
ln = 4
panel *tg.PanelCompo
)

View file

@ -1,13 +1,14 @@
package main
import (
"vultras.su/core/tg"
"surdeus.su/core/tg"
"fmt"
)
const (
StartAbsPath tg.Path = "/"
)
var StartWidget = tg.RenderFunc(func(c tg.Context) tg.UI {
return tg.UI{
tg.Messagef(

2
go.mod
View file

@ -1,4 +1,4 @@
module vultras.su/core/tg
module surdeus.su/core/tg
go 1.20