-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot API 7.6 #711
Bot API 7.6 #711
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sendPaidMedia
is not implemented
@@ -169,6 +169,9 @@ type Context interface { | |||
|
|||
// Set saves data in the context. | |||
Set(key string, val interface{}) | |||
|
|||
// Payment returns payment instance. | |||
Payment() *Payment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it to other functions that return update/message types
@@ -538,3 +541,7 @@ func (c *nativeContext) Get(key string) interface{} { | |||
defer c.lock.RUnlock() | |||
return c.store[key] | |||
} | |||
|
|||
func (c *nativeContext) Payment() *Payment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well. Keep file ordered and easy to navigate.
@@ -34,6 +34,30 @@ type InputMedia struct { | |||
HasSpoiler bool `json:"has_spoiler,omitempty"` | |||
} | |||
|
|||
type InputPaidMedia struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InputMedia
has the same set of fields, so we can avoid creating another structure
} | ||
|
||
type PaidMediaInfo struct { | ||
StarCount int `json:"star_count"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StarCount int `json:"star_count"` | |
Stars int `json:"star_count"` |
|
||
type PaidMedia struct { | ||
Type string `json:"type"` | ||
Photo []photoSize `json:"photo,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Photo []photoSize `json:"photo,omitempty"` | |
Photo *Photo `json:"photo,omitempty"` |
No description provided.