mirror of
https://github.com/HugeFrog24/go-telegram-bot.git
synced 2026-10-27 21:35:26 +00:00
Dep upd
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
type MockTelegramClient struct {
|
||||
mock.Mock
|
||||
SendMessageFunc func(ctx context.Context, params *bot.SendMessageParams) (*models.Message, error)
|
||||
SendMessageDraftFunc func(ctx context.Context, params *bot.SendMessageDraftParams) (bool, error)
|
||||
SendAudioFunc func(ctx context.Context, params *bot.SendAudioParams) (*models.Message, error)
|
||||
SendChatActionFunc func(ctx context.Context, params *bot.SendChatActionParams) (bool, error)
|
||||
SetMyCommandsFunc func(ctx context.Context, params *bot.SetMyCommandsParams) (bool, error)
|
||||
@@ -30,6 +31,13 @@ func (m *MockTelegramClient) SendMessage(ctx context.Context, params *bot.SendMe
|
||||
return nil, args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockTelegramClient) SendMessageDraft(ctx context.Context, params *bot.SendMessageDraftParams) (bool, error) {
|
||||
if m.SendMessageDraftFunc != nil {
|
||||
return m.SendMessageDraftFunc(ctx, params)
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (m *MockTelegramClient) SetMyCommands(ctx context.Context, params *bot.SetMyCommandsParams) (bool, error) {
|
||||
if m.SetMyCommandsFunc != nil {
|
||||
return m.SetMyCommandsFunc(ctx, params)
|
||||
|
||||
Reference in New Issue
Block a user