TimMcCool / scratchattach

Scratch API wrapper with support for almost all site features, cloud requests framework and more
MIT License
174 stars 44 forks source link

Implement a Way to Check Account Status #212

Closed Are-You-a-Person closed 5 months ago

Are-You-a-Person commented 5 months ago

Currently, there is no way to easily check whether or not a Scratch account is banned/doesn’t exist or does exist normally using Scratchattach.

For example, I should be able to use code similar to this. user = scratch3.get_user("username") user.status #Returns True if the account is valid and False if it is not

An account like https://scratch.mit.edu/users/griffpatch/ should return True because it does not seem banned and does exist. An account like https://scratch.mit.edu/users/Scratch/ should return False because going to the link will result in the error message “Whoops! Our server is Scratch'ing its head”. Whether it is because it was banned or doesn’t exist in the first place doesn’t matter in my situation.

TimMcCool commented 5 months ago

will be added by the end of this week

TimMcCool commented 5 months ago

user.does_exist() has been added in v1.3.7 (will be released in a few minutes)