First run of Teapot::Bot fixes.

* Fix typos in Brain.pm
* Fix typos in User.pm
* Implement typing methods in Message object and make use of it
* Fix incorrect syntax of unless loops in telegrambot.pm
* Add Log::Any as it required by Teapot::Bot
* Do not use --update in bootstrap.sh
* Add data/lat to .gitignore
* Load ChatMember and ChatPermissions in Message object, so we can use 'em and avoid crash
* Supply missing $send_args to _post_request
This commit is contained in:
eleksir
2020-10-30 17:19:40 +03:00
parent 43c0286414
commit a480786afa
7 changed files with 23 additions and 13 deletions

View File

@@ -5,6 +5,8 @@ use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::User;
use Teapot::Bot::Object::Chat;
use Teapot::Bot::Object::ChatMember;
use Teapot::Bot::Object::ChatPermissions;
use Teapot::Bot::Object::MessageEntity;
use Teapot::Bot::Object::Audio;
use Teapot::Bot::Object::Document;
@@ -135,6 +137,11 @@ sub reply {
return $self->_brain->sendMessage({chat_id => $self->chat->id, text => $text});
}
sub typing {
my $self = shift;
return $self->_brain->sendChatAction({chat_id => $self->chat->id});
}
1;
__END__