Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Bot API 7.6 #711

wants to merge 2 commits into from

Conversation

Apolisk
Copy link
Contributor

@Apolisk Apolisk commented Jul 5, 2024

No description provided.

@demget demget changed the base branch from v3 to v3.4 July 11, 2024 13:16
@Apolisk Apolisk closed this by deleting the head repository Aug 9, 2024
Copy link
Collaborator

@demget demget left a 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
Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
StarCount int `json:"star_count"`
Stars int `json:"star_count"`


type PaidMedia struct {
Type string `json:"type"`
Photo []photoSize `json:"photo,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Photo []photoSize `json:"photo,omitempty"`
Photo *Photo `json:"photo,omitempty"`

@demget demget added this to the v3.4 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants