Skip to content

Commit 8999cea

Browse files
authored
Merge pull request #483 from alexandear/fix-typos-grammar
Fix typos and grammar issues in comments
2 parents d7df856 + 77aa442 commit 8999cea

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Go Reference](https://pkg.go.dev/badge/github.com/go-telegram-bot-api/telegram-bot-api/v5.svg)](https://pkg.go.dev/github.com/go-telegram-bot-api/telegram-bot-api/v5)
44
[![Test](https://github.com/go-telegram-bot-api/telegram-bot-api/actions/workflows/test.yml/badge.svg)](https://github.com/go-telegram-bot-api/telegram-bot-api/actions/workflows/test.yml)
55

6-
All methods are fairly self explanatory, and reading the [godoc](http://godoc.org/github.com/go-telegram-bot-api/telegram-bot-api) page should
6+
All methods are fairly self-explanatory, and reading the [godoc](http://godoc.org/github.com/go-telegram-bot-api/telegram-bot-api) page should
77
explain everything. If something isn't clear, open an issue or submit
88
a pull request.
99

@@ -63,7 +63,7 @@ func main() {
6363
```
6464

6565
There are more examples on the [site](https://go-telegram-bot-api.dev/)
66-
with detailed information on how to do many different kinds of things.
66+
with detailed information on how to do many kinds of things.
6767
It's a great place to get started on using keyboards, commands, or other
6868
kinds of reply markup.
6969

@@ -178,7 +178,7 @@ func main() {
178178
}
179179
```
180180

181-
If you need, you may generate a self signed certficate, as this requires
181+
If you need, you may generate a self-signed certificate, as this requires
182182
HTTPS / TLS. The above example tells Telegram that this is your
183183
certificate and that it should be trusted, even though it is not
184184
properly signed.

bot.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (bot *BotAPI) decodeAPIResponse(responseBody io.Reader, resp *APIResponse)
150150
return
151151
}
152152

153-
// if debug, read reponse body
153+
// if debug, read response body
154154
data, err := ioutil.ReadAll(responseBody)
155155
if err != nil {
156156
return
@@ -399,7 +399,7 @@ func (bot *BotAPI) GetFile(config FileConfig) (File, error) {
399399
//
400400
// Offset, Limit, Timeout, and AllowedUpdates are optional.
401401
// To avoid stale items, set Offset to one higher than the previous item.
402-
// Set Timeout to a large number to reduce requests so you can get updates
402+
// Set Timeout to a large number to reduce requests, so you can get updates
403403
// instantly instead of having to wait between requests.
404404
func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) {
405405
resp, err := bot.Request(config)

configs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (fi FileID) SendData() string {
224224
return string(fi)
225225
}
226226

227-
// fileAttach is a internal file type used for processed media groups.
227+
// fileAttach is an internal file type used for processed media groups.
228228
type fileAttach string
229229

230230
func (fa fileAttach) NeedsUpload() bool {

params.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (p Params) AddNonZeroFloat(key string, value float64) {
4444
}
4545
}
4646

47-
// AddInterface adds an interface if it is not nill and can be JSON marshalled.
47+
// AddInterface adds an interface if it is not nil and can be JSON marshalled.
4848
func (p Params) AddInterface(key string, value interface{}) error {
4949
if value == nil || (reflect.ValueOf(value).Kind() == reflect.Ptr && reflect.ValueOf(value).IsNil()) {
5050
return nil

passport.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ type (
5454
Credentials *EncryptedCredentials `json:"credentials"`
5555
}
5656

57-
// PassportFile represents a file uploaded to Telegram Passport. Currently all
57+
// PassportFile represents a file uploaded to Telegram Passport. Currently, all
5858
// Telegram Passport files are in JPEG format when decrypted and don't exceed
5959
// 10MB.
6060
PassportFile struct {
@@ -214,7 +214,7 @@ type (
214214
// PassportElementErrorFile represents an issue with a document scan. The
215215
// error is considered resolved when the file with the document scan changes.
216216
PassportElementErrorFile struct {
217-
// Error source, must be file
217+
// Error source, must be a file
218218
Source string `json:"source"`
219219

220220
// The section of the user's Telegram Passport which has the issue, one

types.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (u *Update) CallbackData() string {
147147
return ""
148148
}
149149

150-
// FromChat returns the chat where an update occured.
150+
// FromChat returns the chat where an update occurred.
151151
func (u *Update) FromChat() *Chat {
152152
switch {
153153
case u.Message != nil:
@@ -278,7 +278,7 @@ type Chat struct {
278278
//
279279
// optional
280280
PinnedMessage *Message `json:"pinned_message,omitempty"`
281-
// Permissions is default chat member permissions, for groups and
281+
// Permissions are default chat member permissions, for groups and
282282
// supergroups. Returned only in getChat.
283283
//
284284
// optional
@@ -410,7 +410,7 @@ type Message struct {
410410
//
411411
// optional
412412
Text string `json:"text,omitempty"`
413-
// Entities is for text messages, special entities like usernames,
413+
// Entities are for text messages, special entities like usernames,
414414
// URLs, bot commands, etc. that appear in the text;
415415
//
416416
// optional
@@ -532,15 +532,15 @@ type Message struct {
532532
// MigrateToChatID is the group has been migrated to a supergroup with the specified identifier.
533533
// This number may be greater than 32 bits and some programming languages
534534
// may have difficulty/silent defects in interpreting it.
535-
// But it is smaller than 52 bits, so a signed 64 bit integer
535+
// But it is smaller than 52 bits, so a signed 64-bit integer
536536
// or double-precision float type are safe for storing this identifier;
537537
//
538538
// optional
539539
MigrateToChatID int64 `json:"migrate_to_chat_id,omitempty"`
540540
// MigrateFromChatID is the supergroup has been migrated from a group with the specified identifier.
541541
// This number may be greater than 32 bits and some programming languages
542542
// may have difficulty/silent defects in interpreting it.
543-
// But it is smaller than 52 bits, so a signed 64 bit integer
543+
// But it is smaller than 52 bits, so a signed 64-bit integer
544544
// or double-precision float type are safe for storing this identifier;
545545
//
546546
// optional
@@ -560,7 +560,7 @@ type Message struct {
560560
//
561561
// optional
562562
SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"`
563-
// ConnectedWebsite is Tthe domain name of the website on which the user has
563+
// ConnectedWebsite is the domain name of the website on which the user has
564564
// logged in;
565565
//
566566
// optional
@@ -790,7 +790,7 @@ type PhotoSize struct {
790790

791791
// Animation represents an animation file.
792792
type Animation struct {
793-
// FileID odentifier for this file, which can be used to download or reuse
793+
// FileID is the identifier for this file, which can be used to download or reuse
794794
// the file
795795
FileID string `json:"file_id"`
796796
// FileUniqueID is the unique identifier for this file, which is supposed to
@@ -860,7 +860,7 @@ type Audio struct {
860860

861861
// Document represents a general file.
862862
type Document struct {
863-
// FileID is a identifier for this file, which can be used to download or
863+
// FileID is an identifier for this file, which can be used to download or
864864
// reuse the file
865865
FileID string `json:"file_id"`
866866
// FileUniqueID is the unique identifier for this file, which is supposed to
@@ -1038,7 +1038,7 @@ type Poll struct {
10381038
//
10391039
// optional
10401040
Explanation string `json:"explanation,omitempty"`
1041-
// ExplainationEntities are special entities like usernames, URLs, bot
1041+
// ExplanationEntities are special entities like usernames, URLs, bot
10421042
// commands, etc. that appear in the explanation
10431043
//
10441044
// optional
@@ -1048,7 +1048,7 @@ type Poll struct {
10481048
//
10491049
// optional
10501050
OpenPeriod int `json:"open_period,omitempty"`
1051-
// Closedate is the point in time (unix timestamp) when the poll will be
1051+
// CloseDate is the point in time (unix timestamp) when the poll will be
10521052
// automatically closed
10531053
//
10541054
// optional
@@ -1258,7 +1258,7 @@ type KeyboardButton struct {
12581258
RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"`
12591259
}
12601260

1261-
// KeyboardButtonPollType represents type of a poll, which is allowed to
1261+
// KeyboardButtonPollType represents type of poll, which is allowed to
12621262
// be created and sent when the corresponding button is pressed.
12631263
type KeyboardButtonPollType struct {
12641264
// Type is if quiz is passed, the user will be allowed to create only polls
@@ -1542,7 +1542,7 @@ type ChatMember struct {
15421542
// CanManageChat administrators only.
15431543
// True, if the administrator can access the chat event log, chat
15441544
// statistics, message statistics in channels, see channel members, see
1545-
// anonymous administrators in supergoups and ignore slow mode. Implied by
1545+
// anonymous administrators in supergroups and ignore slow mode. Implied by
15461546
// any other administrator privilege.
15471547
//
15481548
// optional
@@ -1845,7 +1845,7 @@ type InputMediaAnimation struct {
18451845
Duration int `json:"duration,omitempty"`
18461846
}
18471847

1848-
// InputMediaAudio is a audio to send as part of a media group.
1848+
// InputMediaAudio is an audio to send as part of a media group.
18491849
type InputMediaAudio struct {
18501850
BaseInputMedia
18511851
// Thumbnail of the file sent; can be ignored if thumbnail generation for
@@ -1888,7 +1888,7 @@ type Sticker struct {
18881888
// FileID is an identifier for this file, which can be used to download or
18891889
// reuse the file
18901890
FileID string `json:"file_id"`
1891-
// FileUniqueID is an unique identifier for this file,
1891+
// FileUniqueID is a unique identifier for this file,
18921892
// which is supposed to be the same over time and for different bots.
18931893
// Can't be used to download or reuse the file.
18941894
FileUniqueID string `json:"file_unique_id"`
@@ -1976,7 +1976,7 @@ type Game struct {
19761976
//
19771977
// optional
19781978
TextEntities []MessageEntity `json:"text_entities,omitempty"`
1979-
// Animation animation that will be displayed in the game message in chats.
1979+
// Animation is an animation that will be displayed in the game message in chats.
19801980
// Upload via BotFather (https://t.me/botfather).
19811981
//
19821982
// optional
@@ -2094,7 +2094,7 @@ type InlineQueryResultCachedAudio struct {
20942094

20952095
// InlineQueryResultCachedDocument is an inline query response with cached document.
20962096
type InlineQueryResultCachedDocument struct {
2097-
// Type of the result, must be document
2097+
// Type of the result, must be a document
20982098
Type string `json:"type"`
20992099
// ID unique identifier for this result, 1-64 bytes
21002100
ID string `json:"id"`
@@ -2211,7 +2211,7 @@ type InlineQueryResultCachedMPEG4GIF struct {
22112211

22122212
// InlineQueryResultCachedPhoto is an inline query response with cached photo.
22132213
type InlineQueryResultCachedPhoto struct {
2214-
// Type of the result, must be photo.
2214+
// Type of the result, must be a photo.
22152215
Type string `json:"type"`
22162216
// ID unique identifier for this result, 1-64 bytes.
22172217
ID string `json:"id"`
@@ -2252,7 +2252,7 @@ type InlineQueryResultCachedPhoto struct {
22522252

22532253
// InlineQueryResultCachedSticker is an inline query response with cached sticker.
22542254
type InlineQueryResultCachedSticker struct {
2255-
// Type of the result, must be sticker
2255+
// Type of the result, must be a sticker
22562256
Type string `json:"type"`
22572257
// ID unique identifier for this result, 1-64 bytes
22582258
ID string `json:"id"`
@@ -2458,7 +2458,7 @@ type InlineQueryResultGame struct {
24582458

24592459
// InlineQueryResultDocument is an inline query response document.
24602460
type InlineQueryResultDocument struct {
2461-
// Type of the result, must be document
2461+
// Type of the result, must be a document
24622462
Type string `json:"type"`
24632463
// ID unique identifier for this result, 1-64 bytes
24642464
ID string `json:"id"`
@@ -2476,7 +2476,7 @@ type InlineQueryResultDocument struct {
24762476
//
24772477
// optional
24782478
Description string `json:"description,omitempty"`
2479-
// ReplyMarkup nline keyboard attached to the message
2479+
// ReplyMarkup inline keyboard attached to the message
24802480
//
24812481
// optional
24822482
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`

0 commit comments

Comments
 (0)