22 lines
708 B
Go
22 lines
708 B
Go
// 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)
|
|
}
|
|
}
|