Commit Graph

46 Commits

Author SHA1 Message Date
thec0sm0s
5d84158502 ✔ Add low level request method for bot scope resources 2020-06-27 15:40:53 +05:30
thec0sm0s
1fc91d24c2 Handle cases efficiently when user avatar hash is None. Add method to return Discord default avatar url equivalent. 2020-06-02 13:15:00 +05:30
A-Trash-Coder
2417e9dda0 Add operations to the docstrings of guild and user 2020-05-20 23:56:00 -04:00
A-Trash-Coder
eda1e4c1f2 Add operations to the docstrings of guild and user 2020-05-20 23:55:15 -04:00
A-Trash-Coder
857fd4c4ad Add a __eq__ and __ne__ to models Guild and User 2020-05-20 21:45:46 -04:00
thec0sm0s
b1abfb5c2d Set initial value of internal caches to None 2020-05-15 22:41:41 +05:30
thec0sm0s
44e3423cd9 Don't cache guilds by default 2020-05-15 18:54:43 +05:30
thec0sm0s
252506e16c Use user_id shorthand property 2020-05-15 18:31:39 +05:30
thec0sm0s
318e2318b8 Add import to Integration 2020-05-15 18:08:27 +05:30
thec0sm0s
a314928fbf Remove Integrations. Not meant to use directly 2020-05-15 17:38:23 +05:30
thec0sm0s
fad0df2b79 Remove Integrations. Not meant to use directly 2020-05-15 17:37:31 +05:30
thec0sm0s
367a0e4dd3 Minor fix 2020-05-14 22:47:16 +05:30
thec0sm0s
e70fd91424 Override default fetch_from_api and add a caching layer 2020-05-14 22:35:37 +05:30
thec0sm0s
7332ae9f4c Docs typo fix 2020-05-14 22:34:25 +05:30
thec0sm0s
3633d67d4c Minor fix, pass dict rather than list 2020-05-14 22:32:00 +05:30
thec0sm0s
bf323e4585 Update the instance cache itself 2020-05-14 22:29:00 +05:30
thec0sm0s
362e784ba6 Override default fetch_from_api to implement updating guild cache 2020-05-14 22:28:04 +05:30
thec0sm0s
2e6722e5ba Actually cache the user when they're fetch from API 2020-05-14 21:23:39 +05:30
thec0sm0s
6cf7752a10 Add get_from_cache classmethod 2020-05-14 21:14:09 +05:30
thec0sm0s
57ddb9e27f Save discord user id in flask session 2020-05-14 20:58:01 +05:30
thec0sm0s
cbc30d76b1 Override default fetch_from_api classmethod providing options to cache user guilds or connections 2020-05-14 20:52:22 +05:30
thec0sm0s
baa1fefd50 Make integrations as separate entity, which might be also and entity of guild 2020-05-14 20:38:59 +05:30
thec0sm0s
85c597ac9b Add guilds and cache to User internal cache. Also add their fetch methods 2020-05-14 20:38:27 +05:30
thec0sm0s
782d09246f Add MANY property to automatically return list from fetch_from_api when many of these models exists 2020-05-12 12:35:09 +05:30
thec0sm0s
6365ab461a Use DiscordModelsMeta class. Set ROUTE as required class attribute for bases. Add fetch_from_api classmethod which is shorthand to return the current model 2020-05-12 12:20:32 +05:30
thec0sm0s
bc22196695 Use _request shorthand method 2020-05-11 21:28:14 +05:30
thec0sm0s
78e21c4702 Internally handle JSONDecodeError 2020-05-10 17:47:31 +05:30
thec0sm0s
1e97db58f5 Use internal flask_discord request method 2020-05-10 17:20:43 +05:30
thecosmos
2d6c78dda5 Update docs 2020-04-14 18:23:16 +05:30
thecosmos
57c3d4d5a7 Implement add_to_guild method 2020-04-14 17:30:53 +05:30
thecosmos
95aa57a699 Try adding user to guild method [broken] 2020-04-14 15:57:35 +05:30
thecosmos
0030cddb07 Fix docs 2020-04-14 09:53:44 +05:30
thecosmos
03952f66f9 Prefix all configs with DISCORD_ to prevent un intended user override 2020-04-14 08:46:55 +05:30
Dori Lahav Waisberg
a1d321ff69 change id from int to str in comment 2020-02-07 23:31:26 +02:00
Dori Lahav Waisberg
4d6ddb9883 Change id to not cast to int and fail if id is not included on UserConnection constructor 2020-02-07 23:26:24 +02:00
thecosmos
64d59fdb3b discriminator remains string to prevent some special case unwanted stuffs 2019-11-22 15:27:30 +05:30
thecosmos
73d8174533 Add support for animated avatars 2019-11-22 00:56:33 +05:30
thecosmos
d975547968 Add base class. Make to_json available to all of the existing models. 2019-05-22 23:52:17 +05:30
thecosmos
480fdc556e Return None when guild has no icon 2019-05-22 10:57:21 +05:30
thecosmos
767611b603 Documentation 2019-05-08 16:41:51 +05:30
thecosmos
ce488393e6 Documentation 2019-05-08 15:46:24 +05:30
thecosmos
3021a160ae Minor fix 2019-05-07 22:06:34 +05:30
thecosmos
2a1aac8cfa Select packages 2019-05-07 21:59:26 +05:30
thecosmos
628103f5e4 Base Connection model 2019-05-07 21:26:57 +05:30
thecosmos
c022ccec9a Basic Guild model 2019-05-07 17:47:27 +05:30
thecosmos
7a5977420a User model 2019-05-07 17:22:27 +05:30