Commit Graph

52 Commits

Author SHA1 Message Date
Demian
5a1a187e87 telebot: clarify and fix all naming issues 2020-06-19 23:36:43 +03:00
Demian
c602a3df68 message: add missed forward fields 2020-06-13 13:23:01 +03:00
Demian
e1811e100a tests: implement more 2020-06-09 23:28:28 +03:00
Demian
dc9db44c81 message: add via_bot field 2020-06-07 21:52:26 +03:00
Demian
7a1d59c7d9 payments: SuccessfulPayment and minor changes 2020-05-21 11:48:24 +03:00
Demian
525f94ff6a message: update message types 2020-04-26 18:48:16 +03:00
Demian
9087ce99d0 message: some clean-ups 2020-04-26 11:56:23 +03:00
dande
9268c6dff7 dice: added constants 2020-04-25 15:59:53 +03:00
dande
3915e8596b dice: fixed dice handling 2020-04-25 15:31:16 +03:00
dande
ab0c9a7060 dice: added dice support 2020-04-25 14:41:48 +03:00
Demian
9b11223d56 bot: complete Polls 2.0 API 2020-04-24 17:52:15 +03:00
Eugene Bravov
bd69a13f32
Add animation to maeesage 2020-02-29 15:34:07 +03:00
Viktor Oreshkin
a770d6d951 Fix typos and misspells 2019-12-26 01:55:51 +03:00
demiangetman
11b34b3857 Add ReplyMarkup field to Message 2019-12-26 01:44:51 +03:00
demiangetman
53bfa49b78 Fill callback inline message on update 2019-12-08 11:57:09 +03:00
Ian Byrd
bda24d8650 Possibly breaking some builds, but inline message IDs won't work
otherwise.
2017-12-27 00:39:15 +02:00
Jonas Bögle
933b28f94e
fixed IsForwarded()
reverts a tiny change from dbc2cd7f6, we need to check both fields because:
- m.OriginalChat is nil when message is not forwarded from a channel
- m.OriginalSender can be nil if the message is forwarded from a channel
(doc: https://core.telegram.org/bots/api#message)
2017-12-25 13:34:09 +01:00
Ian Byrd
4cf58f4c5b
Automatic command payload handling. 2017-11-27 16:56:22 +02:00
Ian Byrd
d6ef68605b
Complete list of endpoints is now supported (see const.) 2017-11-26 03:38:30 +02:00
Ian Byrd
83eb527fe5
Albums added, this commit resolves #103. 2017-11-25 16:22:13 +02:00
Ian Byrd
79dccd7227
Endpoints for media introduced, Message.From -> Message.Sender 2017-11-24 17:24:07 +02:00
Ian Byrd
9aad0c4faa
OnAddedToGroup introduced. 2017-11-23 04:13:15 +02:00
Ian Byrd
2173ce9ad6
Documentation 2017-11-21 04:49:37 +02:00
Ian Byrd
0f1d521167
Cleanup, documentation, bikeshedding. 2017-11-19 17:21:25 +02:00
Ian Byrd
d5e4082eaf
New Edit() and EditCaption() methods are taking over.
IMO, we shouldn't be introducing distinct EditText/EditMarkup
methods because it just doesn't make sense, you can do both in
one and EditCaption is a pretty odd case so we live it be.
2017-11-19 03:44:31 +02:00
Ian Byrd
ff0015f004
Good news Edit() now works for all Editable text messages! 2017-11-18 20:47:04 +02:00
Ian Byrd
7316e92265
Viva la File, my boys, viva la File! 2017-11-18 20:16:16 +02:00
Ian Byrd
b6938a118c
Telebot now compiles! :-) 2017-11-18 16:44:57 +02:00
Ian Byrd
dbc2cd7f6d
Massive refactoring and file structure changes.
- Callback structs has been moved to callbacks.go
- User / Chat and its methods -> chat.go
- Concept of Editable and Message Signature introduced
- No more types.go, it's been refactored into media.go + friends
2017-11-18 15:06:20 +02:00
Ian Byrd
e1f4f1b228
Thumbnail -> Photo, new types supported: Voice, VideoNote. 2017-11-17 15:10:18 +02:00
Ian Byrd
ef59af6db7
Introducing Sendable interface (see #93.)
This commit refactors lots of duplicated code from bot.go, so
instead of having N redundant SendX methods, now it's the
responsibility of all Sendable objects to implement Send(..)
instead. Impl in types_send.go, 150 LOC only!
2017-11-17 08:20:36 +02:00
Ian Byrd
127bf18d79
Optimizes SendOptions / ReplyMarkup. 2017-11-17 04:51:03 +02:00
Ian Byrd
d8b3194888 Message: optionals are now stored by-pointer, saving 67.4% of mem.
This is a breaking change! Reducing memory usage from 1544 bytes
down to 504 bytes on 64-bit system. Considering Message is the
most used Telebot type, it's a pretty big deal.

Also, now we finally can test optional fields against nil!
2017-08-25 16:27:58 +03:00
irgendwer / Jonas
12099b9b19 support for forwarded messages from channels
This would fix the problem that forwarded messages from channels don't get detected as forwarded and allows you to get the chat id of the channel the message was originally posted to.
2017-02-25 02:29:09 +01:00
Ian Byrd
d8b2ca1983
Fixes lots of complete bollocks that got into the codebase.
- Malformed JSON field tags, OMG fixed
- Making linters happy
- Foursquare_id -> FoursquareID, fuck BC
2016-11-10 21:34:02 +02:00
Ahmadreza Zibaei
30d20b61f4 Caption added in Message struct 2016-10-09 23:18:19 +03:30
Vlad Lukyanov
15e5df6636 Add MessageEntity support 2016-07-11 00:09:42 +05:00
Ian Byrd
68ad7fd5dc
Hotfixing the bug introduced by jerks from Telegram:
>Renamed the fields new_chat_participant and left_chat_participant
>of the Message object to new_chat_member and left_chat_member.
via https://core.telegram.org/bots/api#recent-changes
2016-04-13 21:04:51 +03:00
Ian Byrd
061a651188
This commit adds an inline mode implementation and resolves #28.
Only article results supported so far.
2016-01-22 13:38:45 +02:00
Ronmi Ren
5a47937cc1 Support new service message types about channel creation and supergroup migration. 2015-12-24 16:52:27 +08:00
Ilya Kowalewski
72ce8fae88 Fixing #21 issue, introducing Recipient interface 2015-10-17 01:36:07 +03:00
Ilya Kowalewski
74d63a4754 Merging #20 into tucnak:master from aladine:patch-3 2015-10-16 19:36:20 +03:00
Anton Volodin
faeff79108 DRY condition fix 2015-10-13 17:42:17 +03:00
Anton Volodin
e9e91531ad A little code bloat fix 2015-10-13 17:31:51 +03:00
Ilya Kowalewski
eaf9b17a54 Achieving final satisfaction with golint 2015-07-06 19:27:57 +03:00
Ilya Kowalewski
5da873e39b Fix for even more lint warnings 2015-07-06 16:53:59 +03:00
Ilya Kowalewski
e041242bb2 Fixed a bunch of lint issues 2015-07-03 21:58:29 +03:00
Ilya Kowalewski
d2435c4688 Message forwarding 2015-07-02 12:55:40 +03:00
Ilya Kowalewski
43bbb6b396 All message types and replying/forwarding from API covered. 2015-06-27 20:37:22 +03:00
Ilya Kowalewski
fa51650dad A little more documentation, code cleanup 2015-06-27 18:55:12 +03:00