diff --git a/bot/1_update.go b/bot/1_update.go index b2501b3..2f651bc 100644 --- a/bot/1_update.go +++ b/bot/1_update.go @@ -51,7 +51,9 @@ func getLocalVersion() (meta metadata, err error) { return meta, err } err = json.Unmarshal(content, &meta) - return meta, err + } else { + meta.VersionCode, _ = strconv.Atoi(config["BinVersionCode"]) + meta.Version = config["BinVersionName"] } return meta, err } @@ -61,14 +63,10 @@ func checkUpdate(versionData []versions) (meta metadata, err error) { var versionName string var versionCode int currentVersion, _ := getLocalVersion() - if currentVersion.VersionCode != 0 { - versionCode = currentVersion.VersionCode - versionName = currentVersion.Version - meta = currentVersion - } else { - versionCode, _ = strconv.Atoi(config["BinVersionCode"]) - versionName = config["BinVersionName"] - } + + versionCode = currentVersion.VersionCode + versionName = currentVersion.Version + meta = currentVersion latest := func() versions { for _, v := range versionData { @@ -109,7 +107,7 @@ func checkUpdate(versionData []versions) (meta metadata, err error) { } func getVersions() (versionData []versions, err error) { - updateData, err := getFile(fmt.Sprintf("https://raw.githubusercontent.com/%s/versions.json", config["rawRepoPath"])) + updateData, err := getFile(fmt.Sprintf("https://raw.githubusercontent.com/%s/versions_v2.2.json", config["rawRepoPath"])) if err != nil { return versionData, err } diff --git a/bot/2_processMusic.go b/bot/2_processMusic.go index 3fb56be..9511aef 100644 --- a/bot/2_processMusic.go +++ b/bot/2_processMusic.go @@ -110,11 +110,10 @@ func processMusic(musicID int, message tgbotapi.Message, bot *tgbotapi.BotAPI) ( Json: api.CreateSongURLJson(api.SongURLConfig{Ids: []int{musicID}}), }, ) - _, _, err = b.Do(data) - if err != nil { + if b.Do(data).Error != nil { return err } - result := b.Parse() + _, result := b.Parse() var songDetail types.SongsDetailData _ = json.Unmarshal([]byte(result[api.SongDetailAPI]), &songDetail) @@ -297,7 +296,7 @@ func sendMusic(songInfo util.SongInfo, musicPath, picPath string, message tgbota if songInfo.FileID != "" { newAudio = tgbotapi.NewAudio(message.Chat.ID, tgbotapi.FileID(songInfo.FileID)) } else { - newAudio = tgbotapi.NewAudio(message.Chat.ID, musicPath) + newAudio = tgbotapi.NewAudio(message.Chat.ID, tgbotapi.FilePath(musicPath)) } newAudio.Caption = fmt.Sprintf(musicInfo, songInfo.SongName, songInfo.SongArtists, songInfo.SongAlbum, songInfo.FileExt, float64(songInfo.BitRate)/1000, botName) newAudio.Title = fmt.Sprintf("%s", songInfo.SongName) @@ -308,7 +307,7 @@ func sendMusic(songInfo util.SongInfo, musicPath, picPath string, message tgbota newAudio.Thumb = tgbotapi.FileID(songInfo.ThumbFileID) } if picPath != "" { - newAudio.Thumb = picPath + newAudio.Thumb = tgbotapi.FilePath(picPath) } audio, err = bot.Send(newAudio) return audio, err diff --git a/bot/5_bot.go b/bot/5_bot.go index ce910b4..7e5e934 100644 --- a/bot/5_bot.go +++ b/bot/5_bot.go @@ -89,6 +89,7 @@ func Start(conf map[string]string, ext func(*tgbotapi.BotAPI, tgbotapi.Update) e } return 2 } + fmt.Println(meta.VersionCode) if meta.VersionCode < 20200 { for _, i := range botAdmin { msg := tgbotapi.NewMessage(int64(i), updateBinVersion) diff --git a/go.mod b/go.mod index 914a378..7cc2771 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/XiaoMengXinX/Music163bot-Go/v2 go 1.17 require ( - github.com/XiaoMengXinX/CloudMusicDownloader v1.1.2 - github.com/XiaoMengXinX/Music163Api-Go v0.1.15 - github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.0.2-0.20210820200834-309d612d7095 + github.com/XiaoMengXinX/CloudMusicDownloader v1.2.0 + github.com/XiaoMengXinX/Music163Api-Go v0.1.17 + github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.0 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/sirupsen/logrus v1.8.1 github.com/traefik/yaegi v0.10.0 @@ -22,6 +22,6 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.2 // indirect github.com/mattn/go-sqlite3 v1.14.9 // indirect - golang.org/x/sys v0.0.0-20211023085530-d6a326fbbf70 // indirect + golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/go.sum b/go.sum index dda60d5..4037512 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ -github.com/XiaoMengXinX/CloudMusicDownloader v1.1.2 h1:ZOtdSwyjlOAd7vbYuImhFmpS8xNQ68skwZmHgb2xZzM= -github.com/XiaoMengXinX/CloudMusicDownloader v1.1.2/go.mod h1:tDkLgbnBg6TrIxb/kbeYGJgWmgJ9G79HP7UYrzoq8bY= -github.com/XiaoMengXinX/Music163Api-Go v0.1.15 h1:0DGtsC9Fei4zts/WncEUStDaHeViMBJB33PUqFMM4YI= -github.com/XiaoMengXinX/Music163Api-Go v0.1.15/go.mod h1:4lcWLPwXMsTiwcyM6JBEAHkU7NUvYJOMPtfiUj9X0Jw= +github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= +github.com/XiaoMengXinX/CloudMusicDownloader v1.2.0 h1:re0xAoxfAwG1x3bXL1X++qVCEnzppgJsLg2bE7lekPg= +github.com/XiaoMengXinX/CloudMusicDownloader v1.2.0/go.mod h1:tTGKbdf5kLJxE4NiRaVhMTC1c4Vk+yTwYqW+QI4sQN8= +github.com/XiaoMengXinX/Music163Api-Go v0.1.17 h1:iO4nZeYkyWHSvTH3PnQBNxGcOEZaK9EzK849HfH8y8A= +github.com/XiaoMengXinX/Music163Api-Go v0.1.17/go.mod h1:4lcWLPwXMsTiwcyM6JBEAHkU7NUvYJOMPtfiUj9X0Jw= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/bogem/id3v2 v1.2.0 h1:hKDF+F1gOgQ5r1QmBCEZUk4MveJbKxCeIDSBU7CQ4oI= github.com/bogem/id3v2 v1.2.0/go.mod h1:t78PK5AQ56Q47kizpYiV6gtjj3jfxlz87oFpty8DYs8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -15,8 +17,8 @@ github.com/go-flac/flacvorbis v0.1.0 h1:xStJfPrZ/IoA2oBUEwgrlaSf+Opo6/YuQfkqVhkP github.com/go-flac/flacvorbis v0.1.0/go.mod h1:70N9vVkQ4Jew0oBWkwqDMIE21h7pMUtQJpnMD0js6XY= github.com/go-flac/go-flac v0.3.1 h1:BWA7HdO67S4ZLWSVHCxsDHuedFFu5RiV/wmuhvO6Hxo= github.com/go-flac/go-flac v0.3.1/go.mod h1:jG9IumOfAXr+7J40x0AiQIbJzXf9Y7+Zs/2CNWe4LMk= -github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.0.2-0.20210820200834-309d612d7095 h1:oIT1xkRYsax2LkiKiq2Z6SvgAYEdEx4gqMmDaDNaUrg= -github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.0.2-0.20210820200834-309d612d7095/go.mod h1:5+h9c5l1Z/+Pi+5boa1Fmr4Q+FImsXYnifor92ljaVs= +github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.0 h1:BtndtqqCQfPsL2uMkYmduOip1+dPcSmh40l82mBUPKk= +github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.0/go.mod h1:A2S0CWkNylc2phvKXWBBdD3K0iGnDBGbzRpISP2zBl8= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -25,6 +27,7 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -40,9 +43,11 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/traefik/yaegi v0.10.0 h1:c/0rhUcj5+KJhJX++eCrPeKXnJaOZ17X8gYCznU9Xxc= github.com/traefik/yaegi v0.10.0/go.mod h1:RuCwD8/wsX7b6KoQHOaIFUfuH3gQIK4KWnFFmJMw5VA= +github.com/vbauerster/mpb/v5 v5.4.0/go.mod h1:fi4wVo7BVQ22QcvFObm+VwliQXlV1eBT8JDaKXR4JGI= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211023085530-d6a326fbbf70 h1:SeSEfdIxyvwGJliREIJhRPPXvW6sDlLT+UQ3B0hD0NA= -golang.org/x/sys v0.0.0-20211023085530-d6a326fbbf70/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c h1:+8miTPjMCTXwih7BQmvWwd0PjdBZq2MKp/qQaahSzEM= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= diff --git a/symbols/github_com-XiaoMengXinX-Music163Api-Go-api.go b/symbols/github_com-XiaoMengXinX-Music163Api-Go-api.go index 5f06527..95b30ba 100644 --- a/symbols/github_com-XiaoMengXinX-Music163Api-Go-api.go +++ b/symbols/github_com-XiaoMengXinX-Music163Api-Go-api.go @@ -42,11 +42,14 @@ func init() { "CreateSearchSuggestReqJson": reflect.ValueOf(api.CreateSearchSuggestReqJson), "CreateShortUrlJson": reflect.ValueOf(api.CreateShortUrlJson), "CreateSongDetailReqJson": reflect.ValueOf(api.CreateSongDetailReqJson), + "CreateSongDownloadURLJson": reflect.ValueOf(api.CreateSongDownloadURLJson), "CreateSongLikeReqJson": reflect.ValueOf(api.CreateSongLikeReqJson), + "CreateSongLyricReqJson": reflect.ValueOf(api.CreateSongLyricReqJson), "CreateSongURLJson": reflect.ValueOf(api.CreateSongURLJson), "CreateTextMsgReqJson": reflect.ValueOf(api.CreateTextMsgReqJson), "CreateUserPlaylistReqJson": reflect.ValueOf(api.CreateUserPlaylistReqJson), "CreateUserSignReqJson": reflect.ValueOf(api.CreateUserSignReqJson), + "CreateVipTaskRewardReqJson": reflect.ValueOf(api.CreateVipTaskRewardReqJson), "DelComment": reflect.ValueOf(api.DelComment), "DelCommentAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/resource/comments/delete\"", token.STRING, 0)), "DelEvent": reflect.ValueOf(api.DelEvent), @@ -67,12 +70,17 @@ func init() { "GetRecommendSongs": reflect.ValueOf(api.GetRecommendSongs), "GetSearchSuggest": reflect.ValueOf(api.GetSearchSuggest), "GetSongDetail": reflect.ValueOf(api.GetSongDetail), + "GetSongDownloadURL": reflect.ValueOf(api.GetSongDownloadURL), + "GetSongLyric": reflect.ValueOf(api.GetSongLyric), "GetSongURL": reflect.ValueOf(api.GetSongURL), "GetUploadNode": reflect.ValueOf(api.GetUploadNode), "GetUserDetail": reflect.ValueOf(api.GetUserDetail), "GetUserInfo": reflect.ValueOf(api.GetUserInfo), "GetUserPlaylist": reflect.ValueOf(api.GetUserPlaylist), "GetUserSetting": reflect.ValueOf(api.GetUserSetting), + "GetVipGrowrthpoint": reflect.ValueOf(api.GetVipGrowrthpoint), + "GetVipInfo": reflect.ValueOf(api.GetVipInfo), + "GetVipTasksList": reflect.ValueOf(api.GetVipTasksList), "LoginStatusAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/w/nuser/account/get\"", token.STRING, 0)), "MusicianSign": reflect.ValueOf(api.MusicianSign), "MusicianSignAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/creator/user/access\"", token.STRING, 0)), @@ -116,8 +124,10 @@ func init() { "SendTextMsg": reflect.ValueOf(api.SendTextMsg), "ShortUrlAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/middle/shorturl/generate\"", token.STRING, 0)), "SongDetailAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/v3/song/detail\"", token.STRING, 0)), + "SongDownloadURL": reflect.ValueOf(constant.MakeFromLiteral("\"/api/song/enhance/download/url\"", token.STRING, 0)), "SongLike": reflect.ValueOf(api.SongLike), "SongLikeAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/song/like\"", token.STRING, 0)), + "SongLyricAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/song/lyric\"", token.STRING, 0)), "SongUrlAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/song/enhance/player/url/v1\"", token.STRING, 0)), "UploadEventImg": reflect.ValueOf(api.UploadEventImg), "UploadEventImgAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/upload/event/img/v1\"", token.STRING, 0)), @@ -129,6 +139,13 @@ func init() { "UserSettingAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/user/setting\"", token.STRING, 0)), "UserSign": reflect.ValueOf(api.UserSign), "UserSignAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/point/dailyTask\"", token.STRING, 0)), + "VipGrowrthpointAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/vipnewcenter/app/level/growhpoint/basic\"", token.STRING, 0)), + "VipInfoAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/music-vip-membership/client/vip/info\"", token.STRING, 0)), + "VipTaskReward": reflect.ValueOf(api.VipTaskReward), + "VipTaskRewardAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/vipnewcenter/app/level/task/reward/get\"", token.STRING, 0)), + "VipTaskRewardAll": reflect.ValueOf(api.VipTaskRewardAll), + "VipTaskRewardAllAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/vipnewcenter/app/level/task/reward/getall\"", token.STRING, 0)), + "VipTasksListAPI": reflect.ValueOf(constant.MakeFromLiteral("\"/api/vipnewcenter/app/level/task/list\"", token.STRING, 0)), // type definitions "AlbumDetailReq": reflect.ValueOf((*api.AlbumDetailReq)(nil)), @@ -163,11 +180,14 @@ func init() { "SendPicMsgReq": reflect.ValueOf((*api.SendPicMsgReq)(nil)), "ShortUrlReq": reflect.ValueOf((*api.ShortUrlReq)(nil)), "SongDetailReq": reflect.ValueOf((*api.SongDetailReq)(nil)), + "SongDownloadURLReq": reflect.ValueOf((*api.SongDownloadURLReq)(nil)), "SongLikeReq": reflect.ValueOf((*api.SongLikeReq)(nil)), + "SongLyricReq": reflect.ValueOf((*api.SongLyricReq)(nil)), "SongURLConfig": reflect.ValueOf((*api.SongURLConfig)(nil)), "SongUrlReq": reflect.ValueOf((*api.SongUrlReq)(nil)), "UserPlaylistConfig": reflect.ValueOf((*api.UserPlaylistConfig)(nil)), "UserPlaylistReq": reflect.ValueOf((*api.UserPlaylistReq)(nil)), "UserSignReqJson": reflect.ValueOf((*api.UserSignReqJson)(nil)), + "VipTaskRewardReqJson": reflect.ValueOf((*api.VipTaskRewardReqJson)(nil)), } } diff --git a/symbols/github_com-go-telegram-bot-api-telegram-bot-api-v5.go b/symbols/github_com-go-telegram-bot-api-telegram-bot-api-v5.go index 426dd82..4d5889d 100644 --- a/symbols/github_com-go-telegram-bot-api-telegram-bot-api-v5.go +++ b/symbols/github_com-go-telegram-bot-api-telegram-bot-api-v5.go @@ -6,6 +6,7 @@ import ( "github.com/go-telegram-bot-api/telegram-bot-api/v5" "go/constant" "go/token" + "io" "net/http" "reflect" ) @@ -14,20 +15,18 @@ func init() { Symbols["github.com/go-telegram-bot-api/telegram-bot-api/v5/tgbotapi"] = map[string]reflect.Value{ // function, constant and variable definitions "APIEndpoint": reflect.ValueOf(constant.MakeFromLiteral("\"https://api.telegram.org/bot%s/%s\"", token.STRING, 0)), + "ChatChooseSticker": reflect.ValueOf(constant.MakeFromLiteral("\"choose_sticker\"", token.STRING, 0)), "ChatFindLocation": reflect.ValueOf(constant.MakeFromLiteral("\"find_location\"", token.STRING, 0)), - "ChatRecordAudio": reflect.ValueOf(constant.MakeFromLiteral("\"record_audio\"", token.STRING, 0)), "ChatRecordVideo": reflect.ValueOf(constant.MakeFromLiteral("\"record_video\"", token.STRING, 0)), "ChatRecordVideoNote": reflect.ValueOf(constant.MakeFromLiteral("\"record_video_note\"", token.STRING, 0)), "ChatRecordVoice": reflect.ValueOf(constant.MakeFromLiteral("\"record_voice\"", token.STRING, 0)), "ChatTyping": reflect.ValueOf(constant.MakeFromLiteral("\"typing\"", token.STRING, 0)), - "ChatUploadAudio": reflect.ValueOf(constant.MakeFromLiteral("\"upload_audio\"", token.STRING, 0)), "ChatUploadDocument": reflect.ValueOf(constant.MakeFromLiteral("\"upload_document\"", token.STRING, 0)), "ChatUploadPhoto": reflect.ValueOf(constant.MakeFromLiteral("\"upload_photo\"", token.STRING, 0)), "ChatUploadVideo": reflect.ValueOf(constant.MakeFromLiteral("\"upload_video\"", token.STRING, 0)), "ChatUploadVideoNote": reflect.ValueOf(constant.MakeFromLiteral("\"upload_video_note\"", token.STRING, 0)), "ChatUploadVoice": reflect.ValueOf(constant.MakeFromLiteral("\"upload_voice\"", token.STRING, 0)), "ErrAPIForbidden": reflect.ValueOf(constant.MakeFromLiteral("\"forbidden\"", token.STRING, 0)), - "ErrBadFileType": reflect.ValueOf(constant.MakeFromLiteral("\"bad file type\"", token.STRING, 0)), "ErrBadURL": reflect.ValueOf(constant.MakeFromLiteral("\"bad or empty url\"", token.STRING, 0)), "EscapeText": reflect.ValueOf(tgbotapi.EscapeText), "FileEndpoint": reflect.ValueOf(constant.MakeFromLiteral("\"https://api.telegram.org/file/bot%s/%s\"", token.STRING, 0)), @@ -117,7 +116,6 @@ func init() { "NewPoll": reflect.ValueOf(tgbotapi.NewPoll), "NewRemoveKeyboard": reflect.ValueOf(tgbotapi.NewRemoveKeyboard), "NewReplyKeyboard": reflect.ValueOf(tgbotapi.NewReplyKeyboard), - "NewSendDice": reflect.ValueOf(tgbotapi.NewSendDice), "NewSetMyCommands": reflect.ValueOf(tgbotapi.NewSetMyCommands), "NewSetMyCommandsWithScope": reflect.ValueOf(tgbotapi.NewSetMyCommandsWithScope), "NewSetMyCommandsWithScopeAndLanguage": reflect.ValueOf(tgbotapi.NewSetMyCommandsWithScopeAndLanguage), @@ -152,8 +150,11 @@ func init() { "AddStickerConfig": reflect.ValueOf((*tgbotapi.AddStickerConfig)(nil)), "Animation": reflect.ValueOf((*tgbotapi.Animation)(nil)), "AnimationConfig": reflect.ValueOf((*tgbotapi.AnimationConfig)(nil)), + "ApproveChatJoinRequestConfig": reflect.ValueOf((*tgbotapi.ApproveChatJoinRequestConfig)(nil)), "Audio": reflect.ValueOf((*tgbotapi.Audio)(nil)), "AudioConfig": reflect.ValueOf((*tgbotapi.AudioConfig)(nil)), + "BanChatMemberConfig": reflect.ValueOf((*tgbotapi.BanChatMemberConfig)(nil)), + "BanChatSenderChatConfig": reflect.ValueOf((*tgbotapi.BanChatSenderChatConfig)(nil)), "BaseChat": reflect.ValueOf((*tgbotapi.BaseChat)(nil)), "BaseEdit": reflect.ValueOf((*tgbotapi.BaseEdit)(nil)), "BaseFile": reflect.ValueOf((*tgbotapi.BaseFile)(nil)), @@ -173,6 +174,7 @@ func init() { "ChatInfoConfig": reflect.ValueOf((*tgbotapi.ChatInfoConfig)(nil)), "ChatInviteLink": reflect.ValueOf((*tgbotapi.ChatInviteLink)(nil)), "ChatInviteLinkConfig": reflect.ValueOf((*tgbotapi.ChatInviteLinkConfig)(nil)), + "ChatJoinRequest": reflect.ValueOf((*tgbotapi.ChatJoinRequest)(nil)), "ChatLocation": reflect.ValueOf((*tgbotapi.ChatLocation)(nil)), "ChatMember": reflect.ValueOf((*tgbotapi.ChatMember)(nil)), "ChatMemberConfig": reflect.ValueOf((*tgbotapi.ChatMemberConfig)(nil)), @@ -189,6 +191,7 @@ func init() { "CreateChatInviteLinkConfig": reflect.ValueOf((*tgbotapi.CreateChatInviteLinkConfig)(nil)), "Credentials": reflect.ValueOf((*tgbotapi.Credentials)(nil)), "DataCredentials": reflect.ValueOf((*tgbotapi.DataCredentials)(nil)), + "DeclineChatJoinRequest": reflect.ValueOf((*tgbotapi.DeclineChatJoinRequest)(nil)), "DeleteChatPhotoConfig": reflect.ValueOf((*tgbotapi.DeleteChatPhotoConfig)(nil)), "DeleteChatStickerSetConfig": reflect.ValueOf((*tgbotapi.DeleteChatStickerSetConfig)(nil)), "DeleteMessageConfig": reflect.ValueOf((*tgbotapi.DeleteMessageConfig)(nil)), @@ -213,6 +216,7 @@ func init() { "FileConfig": reflect.ValueOf((*tgbotapi.FileConfig)(nil)), "FileCredentials": reflect.ValueOf((*tgbotapi.FileCredentials)(nil)), "FileID": reflect.ValueOf((*tgbotapi.FileID)(nil)), + "FilePath": reflect.ValueOf((*tgbotapi.FilePath)(nil)), "FileReader": reflect.ValueOf((*tgbotapi.FileReader)(nil)), "FileURL": reflect.ValueOf((*tgbotapi.FileURL)(nil)), "Fileable": reflect.ValueOf((*tgbotapi.Fileable)(nil)), @@ -310,6 +314,7 @@ func init() { "ReplyKeyboardMarkup": reflect.ValueOf((*tgbotapi.ReplyKeyboardMarkup)(nil)), "ReplyKeyboardRemove": reflect.ValueOf((*tgbotapi.ReplyKeyboardRemove)(nil)), "RequestFile": reflect.ValueOf((*tgbotapi.RequestFile)(nil)), + "RequestFileData": reflect.ValueOf((*tgbotapi.RequestFileData)(nil)), "ResponseParameters": reflect.ValueOf((*tgbotapi.ResponseParameters)(nil)), "RestrictChatMemberConfig": reflect.ValueOf((*tgbotapi.RestrictChatMemberConfig)(nil)), "RevokeChatInviteLinkConfig": reflect.ValueOf((*tgbotapi.RevokeChatInviteLinkConfig)(nil)), @@ -337,6 +342,7 @@ func init() { "StopPollConfig": reflect.ValueOf((*tgbotapi.StopPollConfig)(nil)), "SuccessfulPayment": reflect.ValueOf((*tgbotapi.SuccessfulPayment)(nil)), "UnbanChatMemberConfig": reflect.ValueOf((*tgbotapi.UnbanChatMemberConfig)(nil)), + "UnbanChatSenderChatConfig": reflect.ValueOf((*tgbotapi.UnbanChatSenderChatConfig)(nil)), "UnpinAllChatMessagesConfig": reflect.ValueOf((*tgbotapi.UnpinAllChatMessagesConfig)(nil)), "UnpinChatMessageConfig": reflect.ValueOf((*tgbotapi.UnpinChatMessageConfig)(nil)), "Update": reflect.ValueOf((*tgbotapi.Update)(nil)), @@ -368,6 +374,7 @@ func init() { "_HTTPClient": reflect.ValueOf((*_github_com_go_telegram_bot_api_telegram_bot_api_v5_HTTPClient)(nil)), "_PassportElementError": reflect.ValueOf((*_github_com_go_telegram_bot_api_telegram_bot_api_v5_PassportElementError)(nil)), "_PassportScopeElement": reflect.ValueOf((*_github_com_go_telegram_bot_api_telegram_bot_api_v5_PassportScopeElement)(nil)), + "_RequestFileData": reflect.ValueOf((*_github_com_go_telegram_bot_api_telegram_bot_api_v5_RequestFileData)(nil)), } } @@ -419,3 +426,21 @@ type _github_com_go_telegram_bot_api_telegram_bot_api_v5_PassportScopeElement st func (W _github_com_go_telegram_bot_api_telegram_bot_api_v5_PassportScopeElement) ScopeType() string { return W.WScopeType() } + +// _github_com_go_telegram_bot_api_telegram_bot_api_v5_RequestFileData is an interface wrapper for RequestFileData type +type _github_com_go_telegram_bot_api_telegram_bot_api_v5_RequestFileData struct { + IValue interface{} + WNeedsUpload func() bool + WSendData func() string + WUploadData func() (string, io.Reader, error) +} + +func (W _github_com_go_telegram_bot_api_telegram_bot_api_v5_RequestFileData) NeedsUpload() bool { + return W.WNeedsUpload() +} +func (W _github_com_go_telegram_bot_api_telegram_bot_api_v5_RequestFileData) SendData() string { + return W.WSendData() +} +func (W _github_com_go_telegram_bot_api_telegram_bot_api_v5_RequestFileData) UploadData() (string, io.Reader, error) { + return W.WUploadData() +} diff --git a/versions_v2.2.json b/versions_v2.2.json new file mode 100644 index 0000000..4fbb1c1 --- /dev/null +++ b/versions_v2.2.json @@ -0,0 +1,7 @@ +[ + { + "version": "v2.2.0", + "version_code": 20200, + "commit_sha": "" + } +] \ No newline at end of file