Skip to content
Open
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
4 changes: 2 additions & 2 deletions chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def im_lonely_chat_with_me(event):
try:
message = event.text.split(" ", 1)[1]
except IndexError:
return await eod(event, get_string("tban_1"), time=10)
return await event.reply(get_string("tban_1"))
reply_ = await get_chatbot_reply(message=message)
await event.eor(reply_)

Expand Down Expand Up @@ -94,7 +94,7 @@ async def chat_bot_fn(event, type_):
@ultroid_bot.on(events.NewMessage(incoming=True))
async def chatBot_replies(e):
sender = await e.get_sender()
if sender.bot:
if not sender or getattr(sender, 'bot', False):
return
key = udB.get_key("CHATBOT_USERS") or {}
if e.text and key.get(e.chat_id) and sender.id in key[e.chat_id]:
Expand Down