tomer8007 / kik-bot-api-unofficial

Python API for writing unoffical Kik bots that act like humans
MIT License
126 stars 76 forks source link

unable to get creation date from xiphias_get_users_by_alias in a public group #178

Closed aspwil closed 3 years ago

aspwil commented 3 years ago

in xiphias.py under class UsersResponseUser: in the descriptive comment of what the function does it states

    Alias jids provided in public groups (used with client.xiphias_get_users_by_alias):
        Includes all the private profile data (username, display_name, etc) of a user
        if you're chatting with them, else it'll get the local jid -->and the creation date.<--

but when client.xiphias_get_users_by_alias(chat_message.alias_sender).creation_date_nanos is called it throws the error 'str' object has no attribute 'creation_date_nanos', so it appears to not have been created. either a piece of code is missing or the comment describing what it does is wrong (or i messed up my code in some way)

tomer8007 commented 3 years ago

Take a look at this example, I think it has what you want,

bluemods commented 3 years ago

Some Kik accounts are known to be glitched and not have the account creation time in the xiphias response. It's unknown why this happens, but it only typically happens for older accounts. An example on Kik would be @CinnamonHollow

aspwil commented 3 years ago

my code was actually wrong. I was forgetting to get the user object out the array it provided (I thought it was just a direct user responce)