Rapptz
490bbffc93
Remove in-place edits and return fresh instances instead
Fixes #4098
4 years ago
Rapptz
17f0b59c76
Move explanation note for type ignore above the offending line
4 years ago
Rapptz
28ed599345
Fix Template.source_guild typehint
4 years ago
Stocker
e79a648987
Add missing typehints to template.py
4 years ago
Rapptz
ecf239d2a2
Fix user cache acting incorrectly with evictions
The first issue involved copied users which would lead to user updates
causing faster evictions of the cache than was expected.
The second issue involved users that weren't bound to an internal
lifetime eviction policy. These users would not get evicted.
For example, a user without mutual guilds or being part of the internal
cache in general (messages, DMs) would never end up being evicted for
some strange reason. To handle this case, store_user would get a
counterpart named create_user which would create a user without
potentially storing them in the cache. That way only users with a
bound lifetime within the library would be stored.
4 years ago
Rapptz
62b024803a
Mock PartialTemplateState._get_guild as pass-through
4 years ago
Rapptz
b1a355394f
Rework Template.edit to use MISSING sentinel
4 years ago
Sebastian Law
124c4a3919
Add Template.url
4 years ago
Nadir Chowdhury
157801bc90
Add Template.is_dirty
4 years ago
Rapptz
d58edd10a7
Add missing future annotations import
4 years ago
Nadir Chowdhury
1efdef3ac3
Add typings for invites, templates, and bans
4 years ago
Rapptz
99fc950510
Use f-strings in more places that were missed.
4 years ago
Rapptz
ff7094ce96
Convert datetimes to aware datetimes with UTC.
Naive datetimes will now be interpreted as local time throughout
the library.
4 years ago
Rapptz
54288879e2
Remove userbot functionality
This has a lot of legacy and cruft so there may be some stuff I've
missed but this first pass is enough to get a clear separation.
4 years ago
Rapptz
9d39b135f4
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
4 years ago
Nadir Chowdhury
7d345e8e4e
remove trailing whitespace
4 years ago
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
4 years ago
Nadir Chowdhury
fb773dc1dd
Add remaining template endpoints
4 years ago
Nihaal Sangha
69bdc3a184
Change copyright year to present
4 years ago
Rapptz
431ee8794b
Fix error with templates not having access to member cache flags.
This also changes the attribute from having an underscore
Fix #5986
4 years ago
apple502j
fb5359f028
Add missing comma in template.py
5 years ago
Xua
a1d6ff82dd
Fix NameError and AttributeError in Template and Integrations
5 years ago
Riley S
b2065c92df
Fix typo when creating a guild via template
5 years ago
NCPlayz
3408695a37
[docs] fix reference to `Guild` and document `utils.resolve_template`
5 years ago
James
61216112d0
Add a licence and encoding declaration to missing files
5 years ago
Skezza
c3bca7ec73
Documentation formatting
5 years ago
Nadir Chowdhury
2b3c6e0d47
Add support for Discord templates
5 years ago