mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
Don't cache guilds by default
This commit is contained in:
@@ -94,14 +94,14 @@ class User(DiscordModelsBase):
|
|||||||
return self.avatar_hash.startswith("a_")
|
return self.avatar_hash.startswith("a_")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fetch_from_api(cls, guilds=True, connections=False):
|
def fetch_from_api(cls, guilds=False, connections=False):
|
||||||
"""A class method which returns an instance of this model by implicitly making an
|
"""A class method which returns an instance of this model by implicitly making an
|
||||||
API call to Discord.
|
API call to Discord. The user returned from API will always be cached and update in internal cache.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
guilds : bool
|
guilds : bool
|
||||||
A boolean indicating if user's guilds should be cached or not. Defaults to ``True``. If chose to not
|
A boolean indicating if user's guilds should be cached or not. Defaults to ``False``. If chose to not
|
||||||
cache, user's guilds can always be obtained from :py:func:`flask_discord.Guilds.fetch_from_api()`.
|
cache, user's guilds can always be obtained from :py:func:`flask_discord.Guilds.fetch_from_api()`.
|
||||||
connections : bool
|
connections : bool
|
||||||
A boolean indicating if user's connections should be cached or not. Defaults to ``False``. If chose to not
|
A boolean indicating if user's connections should be cached or not. Defaults to ``False``. If chose to not
|
||||||
|
|||||||
Reference in New Issue
Block a user