Add created_at properties for Server and User.
This commit is contained in:
		| @@ -218,3 +218,8 @@ class Server(Hashable): | ||||
|     def member_count(self): | ||||
|         """Returns the true member count regardless of it being loaded fully or not.""" | ||||
|         return self._member_count | ||||
|  | ||||
|     @property | ||||
|     def created_at(self): | ||||
|         """Returns the server's creation time in UTC.""" | ||||
|         return utils.snowflake_time(self.id) | ||||
|   | ||||
| @@ -24,6 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||
| DEALINGS IN THE SOFTWARE. | ||||
| """ | ||||
|  | ||||
| from .utils import snowflake_time | ||||
|  | ||||
| class User: | ||||
|     """Represents a Discord user. | ||||
|  | ||||
| @@ -102,3 +104,10 @@ class User: | ||||
|         """ | ||||
|         return channel.permissions_for(self) | ||||
|  | ||||
|     @property | ||||
|     def created_at(self): | ||||
|         """Returns the user's creation time in UTC. | ||||
|  | ||||
|         This is when the user's discord account was created.""" | ||||
|         return snowflake_time(self.id) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user