Version Inicial

This commit is contained in:
2026-04-13 21:42:04 +02:00
commit f5dc96eee5
24 changed files with 2630 additions and 0 deletions

28
utils.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"context"
"os"
"github.com/go-telegram/bot"
"github.com/go-telegram/bot/models"
)
func setProfileImage(ctx context.Context, b *bot.Bot) error {
file, err := os.Open("./conf/DockerBot.jpg")
if err != nil {
return err
}
defer file.Close()
attachName := "profile_photo"
photo := &models.InputProfilePhotoStatic{
Photo: "attach://" + attachName,
MediaAttachment: file,
}
_, err = b.SetMyProfilePhoto(ctx, &bot.SetMyProfilePhotoParams{
Photo: photo})
if err != nil {
return err
}
return nil
}