-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,6 +169,9 @@ type Context interface { | |
|
||
// Set saves data in the context. | ||
Set(key string, val interface{}) | ||
|
||
// Payment returns payment instance. | ||
Payment() *Payment | ||
} | ||
|
||
// nativeContext is a native implementation of the Context interface. | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Here as well. Keep file ordered and easy to navigate. |
||
return c.u.Message.Payment | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
Type string `json:"type"` | ||||||
Media string `json:"media"` | ||||||
Thumbnail string `json:"thumbnail,omitempty"` | ||||||
Width int `json:"width,omitempty"` | ||||||
Height int `json:"height,omitempty"` | ||||||
Duration int `json:"duration,omitempty"` | ||||||
SupportsStreaming bool `json:"supports_streaming"` | ||||||
} | ||||||
|
||||||
type PaidMediaInfo struct { | ||||||
StarCount int `json:"star_count"` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
PaidMedia []PaidMedia `json:"paid_media"` | ||||||
} | ||||||
|
||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Video Video `json:"video,omitempty"` | ||||||
Width int `json:"width,omitempty"` | ||||||
Height int `json:"height,omitempty"` | ||||||
Duration int `json:"duration,omitempty"` | ||||||
} | ||||||
|
||||||
// Inputtable is a generic type for all kinds of media you | ||||||
// can put into an album. | ||||||
type Inputtable interface { | ||||||
|
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