Skip to content

Fix comment format for functions and constants #487

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

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,48 +52,48 @@ const (

// Constant values for update types
const (
// New incoming message of any kind — text, photo, sticker, etc.
// UpdateTypeMessage is new incoming message of any kind — text, photo, sticker, etc.
UpdateTypeMessage = "message"

// New version of a message that is known to the bot and was edited
// UpdateTypeEditedMessage is new version of a message that is known to the bot and was edited
UpdateTypeEditedMessage = "edited_message"

// New incoming channel post of any kind — text, photo, sticker, etc.
// UpdateTypeChannelPost is new incoming channel post of any kind — text, photo, sticker, etc.
UpdateTypeChannelPost = "channel_post"

// New version of a channel post that is known to the bot and was edited
// UpdateTypeEditedChannelPost is new version of a channel post that is known to the bot and was edited
UpdateTypeEditedChannelPost = "edited_channel_post"

// New incoming inline query
// UpdateTypeInlineQuery is new incoming inline query
UpdateTypeInlineQuery = "inline_query"

// The result of an inline query that was chosen by a user and sent to their
// UpdateTypeChosenInlineResult i the result of an inline query that was chosen by a user and sent to their
// chat partner. Please see the documentation on the feedback collecting for
// details on how to enable these updates for your bot.
UpdateTypeChosenInlineResult = "chosen_inline_result"

// New incoming callback query
// UpdateTypeCallbackQuery is new incoming callback query
UpdateTypeCallbackQuery = "callback_query"

// New incoming shipping query. Only for invoices with flexible price
// UpdateTypeShippingQuery is new incoming shipping query. Only for invoices with flexible price
UpdateTypeShippingQuery = "shipping_query"

// New incoming pre-checkout query. Contains full information about checkout
// UpdateTypePreCheckoutQuery is new incoming pre-checkout query. Contains full information about checkout
UpdateTypePreCheckoutQuery = "pre_checkout_query"

// New poll state. Bots receive only updates about stopped polls and polls
// UpdateTypePoll is new poll state. Bots receive only updates about stopped polls and polls
// which are sent by the bot
UpdateTypePoll = "poll"

// A user changed their answer in a non-anonymous poll. Bots receive new votes
// UpdateTypePollAnswer is when user changed their answer in a non-anonymous poll. Bots receive new votes
// only in polls that were sent by the bot itself.
UpdateTypePollAnswer = "poll_answer"

// The bot's chat member status was updated in a chat. For private chats, this
// UpdateTypeMyChatMember is when the bot's chat member status was updated in a chat. For private chats, this
// update is received only when the bot is blocked or unblocked by the user.
UpdateTypeMyChatMember = "my_chat_member"

// The bot must be an administrator in the chat and must explicitly specify
// UpdateTypeChatMember is when the bot must be an administrator in the chat and must explicitly specify
// this update in the list of allowed_updates to receive these updates.
UpdateTypeChatMember = "chat_member"
)
Expand Down Expand Up @@ -125,13 +125,13 @@ type RequestFile struct {

// RequestFileData represents the data to be used for a file.
type RequestFileData interface {
// If the file needs to be uploaded.
// NeedsUpload shows if the file needs to be uploaded.
NeedsUpload() bool

// Get the file name and an `io.Reader` for the file to be uploaded. This
// UploadData gets the file name and an `io.Reader` for the file to be uploaded. This
// must only be called when the file needs to be uploaded.
UploadData() (string, io.Reader, error)
// Get the file data to send when a file does not need to be uploaded. This
// SendData gets the file data to send when a file does not need to be uploaded. This
// must only be called when the file does not need to be uploaded.
SendData() string
}
Expand Down
8 changes: 4 additions & 4 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,12 @@ func NewSetMyCommands(commands ...BotCommand) SetMyCommandsConfig {
return SetMyCommandsConfig{Commands: commands}
}

// NewSetMyCommands allows you to set the registered commands for a given scope.
// NewSetMyCommandsWithScope allows you to set the registered commands for a given scope.
func NewSetMyCommandsWithScope(scope BotCommandScope, commands ...BotCommand) SetMyCommandsConfig {
return SetMyCommandsConfig{Commands: commands, Scope: &scope}
}

// NewSetMyCommands allows you to set the registered commands for a given scope
// NewSetMyCommandsWithScopeAndLanguage allows you to set the registered commands for a given scope
// and language code.
func NewSetMyCommandsWithScopeAndLanguage(scope BotCommandScope, languageCode string, commands ...BotCommand) SetMyCommandsConfig {
return SetMyCommandsConfig{Commands: commands, Scope: &scope, LanguageCode: languageCode}
Expand All @@ -921,13 +921,13 @@ func NewDeleteMyCommands() DeleteMyCommandsConfig {
return DeleteMyCommandsConfig{}
}

// NewDeleteMyCommands allows you to delete the registered commands for a given
// NewDeleteMyCommandsWithScope allows you to delete the registered commands for a given
// scope.
func NewDeleteMyCommandsWithScope(scope BotCommandScope) DeleteMyCommandsConfig {
return DeleteMyCommandsConfig{Scope: &scope}
}

// NewDeleteMyCommands allows you to delete the registered commands for a given
// NewDeleteMyCommandsWithScopeAndLanguage allows you to delete the registered commands for a given
// scope and language code.
func NewDeleteMyCommandsWithScopeAndLanguage(scope BotCommandScope, languageCode string) DeleteMyCommandsConfig {
return DeleteMyCommandsConfig{Scope: &scope, LanguageCode: languageCode}
Expand Down