1.4.5.2
This commit is contained in:
21
EdgeAPI/internal/senders/mediasenders/media_telegram_test.go
Normal file
21
EdgeAPI/internal/senders/mediasenders/media_telegram_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
//go:build plus
|
||||
|
||||
package mediasenders_test
|
||||
|
||||
import (
|
||||
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/senders/mediasenders"
|
||||
timeutil "github.com/iwind/TeaGo/utils/time"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTelegramMedia_Send(t *testing.T) {
|
||||
var media = mediasenders.NewTelegramMedia()
|
||||
media.Token = "YOUR BOT TOKEN" // from @BotFather
|
||||
//media.ProxyURL = "sock5://192.168.2.41:7890"
|
||||
_, err := media.Send("YOUR ID" /** from @get_id_bot **/, "test subject", "test body", teaconst.GlobalProductName, timeutil.Format("Y-m-d H:i:s"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user