Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Move the Poll object to prevent undefined errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alissonlauffer committed Apr 26, 2020
1 parent 837d0c6 commit 904d682
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# amanobot changelog

## 1.8.1 (2020-04-26)
- Hotfix for a bug that prevented amanobot from working

## 1.8.0 (2020-04-26)
- Bot API 4.8
- Supported explanations for Quizzes 2.0. Add explanations by specifying the parameters `explanation` and `explanation_parse_mode` in the method `sendPoll`
Expand Down
2 changes: 1 addition & 1 deletion amanobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from . import exception


__version_info__ = (1, 8, 0)
__version_info__ = (1, 8, 1)
__version__ = '.'.join(map(str, __version_info__))

if sys.version_info <= (3, 4):
Expand Down
33 changes: 16 additions & 17 deletions amanobot/namedtuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,23 +298,6 @@ def StickerArray(data):
'option_ids'
])

# incoming
Poll = _create_class('Poll', [
'id',
'question',
'options',
'total_voter_count',
'is_closed',
'is_anonymous',
'type',
'allows_multiple_answers',
'correct_option_id',
'explanation',
_Field('explanation_entities', constructor=MessageEntityArray),
'open_period',
'close_date'
])

# incoming
Dice = _create_class('Dice', [
'emoji',
Expand Down Expand Up @@ -445,6 +428,22 @@ def ChatMemberArray(data):
def MessageEntityArray(data):
return [MessageEntity(**p) for p in data]

# incoming
Poll = _create_class('Poll', [
'id',
'question',
'options',
'total_voter_count',
'is_closed',
'is_anonymous',
'type',
'allows_multiple_answers',
'correct_option_id',
'explanation',
_Field('explanation_entities', constructor=MessageEntityArray),
'open_period',
'close_date'
])

# incoming
GameHighScore = _create_class('GameHighScore', [
Expand Down

0 comments on commit 904d682

Please sign in to comment.