Skip to content

Commit b7a2ace

Browse files
committed
Merge branch 'oShadow05/fix-docs-code-samples'
2 parents 564893d + e9ff044 commit b7a2ace

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/api/bot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ components.
351351
352352
@bot.timer(1)
353353
def spammer(bot):
354-
bot.send(USER_ID, "Hey!")
354+
bot.chat(USER_ID).send("Hey!")
355355
356356
:param int interval: The execution interval, in seconds.
357357

docs/tasks.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ implement this, with a resolution of one second. Just use the
3939
@bot.timer(3600)
4040
def BONG(bot, shared):
4141
for chat in shared["subs"]:
42-
bot.send(chat, "BONG")
42+
bot.chat(chat).send("BONG")
4343
4444
If you're working with components, you can instead use the
4545
:py:meth:`~botogram.Component.add_timer` method of the component instance.

docs/unavailable-chats.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ can take action without aborting the update processing:
105105
106106
for user in users:
107107
try:
108-
bot.send(user, message)
108+
bot.chat(user).send(message)
109109
except botogram.ChatUnavailableError as e:
110110
print("Can't send messages to %s (reason: %s)" %
111111
(e.chat_id, e.reason))

0 commit comments

Comments
 (0)