✔ Add low level request method for bot scope resources

This commit is contained in:
thec0sm0s
2020-06-27 15:40:53 +05:30
parent d552a048ee
commit 5d84158502
3 changed files with 58 additions and 4 deletions

View File

@@ -28,6 +28,11 @@ class DiscordModelsBase(metaclass=DiscordModelsMeta):
"""
return current_app.discord.request(*args, **kwargs)
@staticmethod
def _bot_request(*args, **kwargs):
"""A shorthand to :py:func:flask_discord.bot_request`."""
return current_app.discord.bot_request(*args, **kwargs)
@classmethod
def fetch_from_api(cls):
"""A class method which returns an instance or list of instances of this model by implicitly making an