107 Commits

Author SHA1 Message Date
Sebastian Law
d6501159e7
[docs] copy signature from overridden and inherited methods 2021-03-29 23:52:14 -04:00
Edwin
31ee3fafc1
Add remove_markdown helper function 2021-03-28 18:38:34 -04:00
Nihaal Sangha
a4d29e8cfd
Add scopes to utils.oauth_url 2021-03-28 06:33:24 -04:00
Nihaal Sangha
a3f700c11f
Fix references to snowflakes being max 21 long 2021-03-02 19:04:03 -05:00
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery 2021-02-24 21:26:51 -05:00
Rapptz
abfc07f968 Fix up previous PR mistake with intentional backslashes 2021-02-21 07:35:31 -05:00
Sebastian Law
a0c1d6f6c5
Fix backslashes showing up in the docs 2021-02-21 07:32:11 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Nadir Chowdhury
6b803acde4
[chore] Remove redundant imports
This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
2020-11-28 03:16:49 -05:00
Rapptz
d9acc2f491 Escape multi-line quotes properly
Fix #5897
2020-10-17 01:36:31 -04:00
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