diff options
Diffstat (limited to 'src/model/user.rs')
| -rw-r--r-- | src/model/user.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/model/user.rs b/src/model/user.rs index a378be5..859f168 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -738,9 +738,10 @@ impl UserId { #[cfg(feature = "cache")] pub fn find(&self) -> Option<Arc<RwLock<User>>> { CACHE.read().user(*self) } - /// Gets a user by its Id over the REST API. + /// Gets a user by its Id from either the cache or the REST API. /// - /// **Note**: The current user must be a bot user. + /// Searches the cache for the user first, if the cache is enabled. If the + /// user was not found, then the user is searched via the REST API. #[inline] pub fn get(&self) -> Result<User> { #[cfg(feature = "cache")] |