Skip to content

Commit 78fee3c

Browse files
jonowotsnoam
authored andcommitted
Fixed docstring of {User,Chat}.send_* methods (python-telegram-bot#1081)
* Changed all "User.chat_id"s to "User.id" * Chat.chat_id --> Chat.id
1 parent 38d6f4d commit 78fee3c

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ The following wonderful people contributed directly or indirectly to this projec
6464
- `Simon Schürrle <https://github.com/SitiSchu>`_
6565
- `sooyhwang <https://github.com/sooyhwang>`_
6666
- `thodnev <https://github.com/thodnev>`_
67+
- `Trainer Jono <https://github.com/Tr-Jono>`_
6768
- `Valentijn <https://github.com/Faalentijn>`_
6869
- `voider1 <https://github.com/voider1>`_
6970
- `Wagner Macedo <https://github.com/wagnerluis1982>`_

telegram/chat.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def unban_member(self, *args, **kwargs):
216216
def send_message(self, *args, **kwargs):
217217
"""Shortcut for::
218218
219-
bot.send_message(Chat.chat_id, *args, **kwargs)
219+
bot.send_message(Chat.id, *args, **kwargs)
220220
221221
Where Chat is the current instance.
222222
@@ -229,7 +229,7 @@ def send_message(self, *args, **kwargs):
229229
def send_photo(self, *args, **kwargs):
230230
"""Shortcut for::
231231
232-
bot.send_photo(Chat.chat_id, *args, **kwargs)
232+
bot.send_photo(Chat.id, *args, **kwargs)
233233
234234
Where Chat is the current instance.
235235
@@ -242,7 +242,7 @@ def send_photo(self, *args, **kwargs):
242242
def send_audio(self, *args, **kwargs):
243243
"""Shortcut for::
244244
245-
bot.send_audio(Chat.chat_id, *args, **kwargs)
245+
bot.send_audio(Chat.id, *args, **kwargs)
246246
247247
Where Chat is the current instance.
248248
@@ -255,7 +255,7 @@ def send_audio(self, *args, **kwargs):
255255
def send_document(self, *args, **kwargs):
256256
"""Shortcut for::
257257
258-
bot.send_document(Chat.chat_id, *args, **kwargs)
258+
bot.send_document(Chat.id, *args, **kwargs)
259259
260260
Where Chat is the current instance.
261261
@@ -268,7 +268,7 @@ def send_document(self, *args, **kwargs):
268268
def send_sticker(self, *args, **kwargs):
269269
"""Shortcut for::
270270
271-
bot.send_sticker(Chat.chat_id, *args, **kwargs)
271+
bot.send_sticker(Chat.id, *args, **kwargs)
272272
273273
Where Chat is the current instance.
274274
@@ -281,7 +281,7 @@ def send_sticker(self, *args, **kwargs):
281281
def send_video(self, *args, **kwargs):
282282
"""Shortcut for::
283283
284-
bot.send_video(Chat.chat_id, *args, **kwargs)
284+
bot.send_video(Chat.id, *args, **kwargs)
285285
286286
Where Chat is the current instance.
287287
@@ -294,7 +294,7 @@ def send_video(self, *args, **kwargs):
294294
def send_video_note(self, *args, **kwargs):
295295
"""Shortcut for::
296296
297-
bot.send_video_note(Chat.chat_id, *args, **kwargs)
297+
bot.send_video_note(Chat.id, *args, **kwargs)
298298
299299
Where Chat is the current instance.
300300
@@ -307,7 +307,7 @@ def send_video_note(self, *args, **kwargs):
307307
def send_voice(self, *args, **kwargs):
308308
"""Shortcut for::
309309
310-
bot.send_voice(Chat.chat_id, *args, **kwargs)
310+
bot.send_voice(Chat.id, *args, **kwargs)
311311
312312
Where Chat is the current instance.
313313

telegram/user.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def mention_html(self, name=None):
150150
def send_message(self, *args, **kwargs):
151151
"""Shortcut for::
152152
153-
bot.send_message(User.chat_id, *args, **kwargs)
153+
bot.send_message(User.id, *args, **kwargs)
154154
155155
Where User is the current instance.
156156
@@ -163,7 +163,7 @@ def send_message(self, *args, **kwargs):
163163
def send_photo(self, *args, **kwargs):
164164
"""Shortcut for::
165165
166-
bot.send_photo(User.chat_id, *args, **kwargs)
166+
bot.send_photo(User.id, *args, **kwargs)
167167
168168
Where User is the current instance.
169169
@@ -176,7 +176,7 @@ def send_photo(self, *args, **kwargs):
176176
def send_audio(self, *args, **kwargs):
177177
"""Shortcut for::
178178
179-
bot.send_audio(User.chat_id, *args, **kwargs)
179+
bot.send_audio(User.id, *args, **kwargs)
180180
181181
Where User is the current instance.
182182
@@ -189,7 +189,7 @@ def send_audio(self, *args, **kwargs):
189189
def send_document(self, *args, **kwargs):
190190
"""Shortcut for::
191191
192-
bot.send_document(User.chat_id, *args, **kwargs)
192+
bot.send_document(User.id, *args, **kwargs)
193193
194194
Where User is the current instance.
195195
@@ -202,7 +202,7 @@ def send_document(self, *args, **kwargs):
202202
def send_sticker(self, *args, **kwargs):
203203
"""Shortcut for::
204204
205-
bot.send_sticker(User.chat_id, *args, **kwargs)
205+
bot.send_sticker(User.id, *args, **kwargs)
206206
207207
Where User is the current instance.
208208
@@ -215,7 +215,7 @@ def send_sticker(self, *args, **kwargs):
215215
def send_video(self, *args, **kwargs):
216216
"""Shortcut for::
217217
218-
bot.send_video(User.chat_id, *args, **kwargs)
218+
bot.send_video(User.id, *args, **kwargs)
219219
220220
Where User is the current instance.
221221
@@ -228,7 +228,7 @@ def send_video(self, *args, **kwargs):
228228
def send_video_note(self, *args, **kwargs):
229229
"""Shortcut for::
230230
231-
bot.send_video_note(User.chat_id, *args, **kwargs)
231+
bot.send_video_note(User.id, *args, **kwargs)
232232
233233
Where User is the current instance.
234234
@@ -241,7 +241,7 @@ def send_video_note(self, *args, **kwargs):
241241
def send_voice(self, *args, **kwargs):
242242
"""Shortcut for::
243243
244-
bot.send_voice(User.chat_id, *args, **kwargs)
244+
bot.send_voice(User.id, *args, **kwargs)
245245
246246
Where User is the current instance.
247247

0 commit comments

Comments
 (0)