Fix /id command in private chats

This commit is contained in:
Tulir Asokan
2021-12-21 13:03:02 +02:00
parent 737c4a1104
commit dfe9bd94b1
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ class Bot(AbstractUser):
elif isinstance(message.to_id, PeerChat):
return reply(str(-message.to_id.chat_id))
elif isinstance(message.to_id, PeerUser):
return reply(f"Your user ID is {message.from_id}.")
return reply(f"Your user ID is {message.to_id.user_id}.")
else:
return reply("Failed to find chat ID.")