ChristopherJHart
f308f34db1
Add note pointing to discord.AllowedMentions
2020-10-04 22:52:00 -04:00
Nadir Chowdhury
6d88316767
Fix NameError with resolving codes with Template
2020-07-31 21:07:20 -04:00
Rapptz
4de01212a4
Fix detection of some JPEG images without JFIF or Exif info
...
Closes #5143
2020-07-21 22:56:51 -04:00
NCPlayz
3408695a37
[docs] fix reference to Guild
and document utils.resolve_template
2020-07-08 23:01:00 -04:00
NCPlayz
ce03c62c6b
[bugs] stop resolving Object for template/invite; remove dupe methods
2020-06-29 16:58:19 +01:00
Nadir Chowdhury
2b3c6e0d47
Add support for Discord templates
2020-06-28 14:48:04 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation ( #5067 )
2020-06-28 03:45:58 -04:00
NCPlayz
a2148d6d1a
Escape masked URLs; Support quotes for as_needed
2020-06-17 16:31:48 +01:00
apple502j
1ee23a235e
Support discord.com/invite URL in resolve_invite
2020-06-04 23:41:40 -04:00
Rapptz
cbdf660ddc
Document that sleep_until considers naive datetimes as UTC.
2020-05-29 02:59:31 -04:00
NCPlayz
f09162f259
isinstance(x, y) and isinstance(x, z) -> isinstance(x, (y, z))
2020-05-23 21:56:40 -04:00
Rapptz
66c6be50d8
Prepare for the discord.com domain rename
2020-05-23 21:44:30 -04:00
Rapptz
17f343b03e
Minor documentation fixes
2020-01-21 21:34:58 -05:00
Rapptz
706a333287
Add missing coroutine header for sleep_until
2020-01-21 20:39:15 -05:00
Josh B
d0a1956be9
Improve usability of utils.sleep_until
...
Fix issue where sleeping for an extended period on python 3.5
would cause an exception
Add sleep_until to API docs
Add result argument to sleep_until
2020-01-21 20:28:14 -05:00
Rapptz
02397306b2
Drop superfluous zero in version related changes in the documentation
2020-01-21 03:47:56 -05:00
Josh B
40369a493d
Add discord.utils.sleep_until helper function
2020-01-21 03:18:25 -05:00
Rapptz
6071607176
Bump copyright year to 2020
...
Closes #2510
2020-01-19 20:03:00 -05:00
alexandrianlibrarian
def012e281
Be more explicit in the utils.find example code.
2019-12-17 00:15:16 -05:00
Rapptz
4ef0fb0d95
Fix more deprecation warnings
2019-11-20 03:04:04 -05:00
Rapptz
a6f61dcbde
Fix all deprecation warnings for 3.8
2019-11-20 02:30:19 -05:00
Rapptz
a238c6178a
Update regex to fetch URLs to match the official client.
...
Fixes #2420 .
2019-11-18 22:22:54 -05:00
Rapptz
ea3d119ca6
Use X-Ratelimit-Reset-After header by default.
...
There is now an option to turn it off, of course.
2019-08-27 18:41:32 -04:00
Rapptz
078d1d71d8
Use new rate limit millisecond precision option.
2019-08-27 18:41:31 -04:00
Rapptz
8e594ac1ad
Escape quote markdown in utils.escape_markdown
2019-07-27 22:14:14 -04:00
Rapptz
5b2f630848
Add Guild.query_members to fetch members from the gateway.
2019-07-15 07:56:48 -04:00
NCPlayz
3c9bcc2851
Improve documentation
2019-06-07 19:27:46 -04:00
Rapptz
0622e18cb9
Speed-up utils.get for the common cases
2019-05-29 00:45:48 -04:00
khazhyk
b1fae0861a
add read-only cached_messages property to Client
...
For those of us who want access to this sweet trove of zero hop messages
2019-04-17 22:41:59 -04:00
Rapptz
7b95611e62
Forgot to escape backticks.
2019-04-07 00:46:15 -04:00
Rapptz
4d06879669
Add ignore_links and as_needed options to utils.escape_markdown.
...
This allows for URLs to be left alone since they can include markdown
characters and allows for total escaping of all markdown characters
by default to prevent some form of data manipulation.
2019-04-07 00:24:34 -04:00
Rapptz
d68af294a2
Fix regex substitution in utils.escape_mentions
2019-04-06 23:02:49 -04:00
Rapptz
9833ea82e2
Add helpers to escape markdown and mentions from text.
...
Fixes #1673
2019-04-06 20:14:05 -04:00
NCPlayz
8a30a4cac0
Add support for guild widget
2019-03-19 09:22:48 -04:00
NCPlayz
fb02191b80
Organise documentation
2019-03-19 08:24:42 -04:00
SnowyLuma
42a7c4f7e5
Add support for guild banners
...
Document banner attribute of Guild and Invite
Update discord/utils.py
Co-Authored-By: SnowyLuma <38926001+SnowyLuma@users.noreply.github.com>
2019-03-09 00:37:49 -05:00
Rapptz
7d877e9067
Better jpeg detection in utils._get_mime_type_for_image
...
Fixes #1901
2019-02-23 10:25:05 -05:00
Rapptz
700dbb5555
Fix missing import.
2019-02-06 02:28:59 -05:00
Rapptz
e429763dea
Try to optimize for the common ASCII case.
...
This is still a slowdown (about 45ns to 300ns) but it's less severe
than the original implementation (about 900 to 1100ns).
2019-02-06 02:15:22 -05:00
cod
d107f485a5
[commands] Fix ext.commands help page full-width indentation
...
add _string_width function to util. Changed string width calculate
function from len() to util function _string_width().
2019-02-06 02:15:04 -05:00
Dante Dam
9656a21ebe
Bumped copyright years to 2019.
2019-01-28 22:22:50 -05:00
Valentin
0614e2af90
Use a tuple for startswith in mime detection code.
2019-01-28 21:47:23 -05:00
khazhyk
c30b016bb5
Support webp in _get_mime_type_for_image
...
untested
2018-11-24 23:18:11 -05:00
Hornwitser
efb4ff850e
[lint] Fix import order
...
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
2018-11-24 22:17:58 -05:00
Hornwitser
a0634b3eea
[lint] Simplyfy util.valid_icon_size
...
Remove redundant paranthesis and checks from util.valid_icon_size.
2018-11-24 22:17:58 -05:00
Hornwitser
51d626eabe
[lint] Remove redundant paranthesis
...
Remove redundant parenthisis around await expressions. Left over from
f25091ef.
2018-11-24 22:17:58 -05:00
Matt (IPv4)
3727ea9811
Add Guild.splash_url_as
2018-10-11 02:38:52 -04:00
Rapptz
95d8bb2e85
Change internal representation of roles in Member and Emoji.
...
Introduce a new internal type, SnowflakeList, which has better memory
footprint over a regular list or set of roles. It is suspected that
there will be a 9x reduction of memory for every Emoji instance and a
48 byte saving per Member instance. However, these savings will
probably only be evident on larger bots.
As a consequence of this change, Member.roles is now computed lazily.
Currently I am not sure if I want to do the initial sorting on the
SnowflakeList for Member, as this comes with a O(n log n) cost when
creating a Member for little purpose since SnowflakeList.has is not
overly relied on. If CPU time becomes an issue this might change.
2018-09-24 22:19:42 -04:00
BeatButton
a4d1599ce9
Change docstrings to raw-strings
2018-09-14 22:55:27 -04:00
Hornwitser
119c5a0618
[lint] Remove unused variables
...
Left over from various refactoring and rewrites.
2018-08-22 21:43:51 -04:00