Commit Graph

147 Commits

Author SHA1 Message Date
f25091efe1 Drop support for Python 3.4 and make minimum version 3.5.2. 2018-06-10 18:10:00 -04:00
d53cada91e Fix TypeError in utils.oauth_url 2017-10-04 21:27:31 -07:00
5e913b265b Change how coroutines are detected internally. 2017-09-16 13:35:00 -04:00
ede1771960 Fix utils.get example. 2017-08-30 01:37:25 -04:00
37b0fdb898 Add webhook support.
Allows for usage of either `requests` and `aiohttp` when used in
"Standalone" mode.

Fixes #704
2017-08-21 01:57:07 -04:00
0a588fac1c allow trailing null bytes in uploaded jpegs 2017-07-25 06:09:41 -04:00
12ca0d9b16 avatar_url_as improvements
static_format will only apply to static (not animated) avatars. Makes
it easier to grab gif-or-'format' of an avatar. Defaults to 'webp'

This is for a similar usecase to avatar_url_as(format=None), except
one can specify the non-animated format, instead of always using
webp.

add User.avatar_is_animated property.

add validation for avatar_url_as, since invalid arguments result in
a url which will return 415, which can be confusing for a user. (They
just see a blank page)

Discord accepts size=16-2048, but images cap at 1024px, so accept 16-1024
Discord accepts "jpg", "jpeg", "png", "gif", and "webp", *unless* the
avatar is not animated, in which case "gif" is not supported. :\
2017-07-25 06:09:40 -04:00
d239cc2666 Implement "partial" message events.
These are events that get triggered regardless of the state of the
message cache. Useful for getting data from before the bot was booted.
2017-06-09 18:36:59 -04:00
f588876587 Use Python3Lexer instead of PythonLexer for pygments. 2017-05-22 07:21:23 -04:00
1fc08bc5a2 Remove unused imports. 2017-04-18 04:22:35 -04:00
29f676c42e Wrap asyncio.wait into a saner alternative that raises TimeoutError.
Fixes #494
2017-02-25 00:03:43 -05:00
dcf826c09b Allow utils.maybe_coroutine to take any arguments. 2017-02-13 20:58:14 -05:00
47ef657fbd Implement async checks. Fixes #380. 2017-02-12 12:13:23 -05:00
ff9f5749e1 Update copyright year to 2017. 2017-01-20 23:19:19 -05:00
e7c5ef181f Allow uploading of GIFs for users.
Discord Nitro accounts can upload GIFs as avatars, so the image
mimetype checker code should check for the GIF magic number too.

Signed-off-by: SunDwarf <l@veriny.tf>
2017-01-08 15:59:27 +00:00
d1d54a468a Rename Server to Guild everywhere. 2017-01-03 09:51:54 -05:00
45c729b167 Switch IDs to use int instead of str 2017-01-03 09:51:49 -05:00
7272190e2d Add support for "Do Not Disturb" and "Invisible" statuses.
This deprecates Client.change_status in favour of the newer and more
correct Client.change_presence.
2016-09-26 19:55:42 -04:00
6b5d579d0b Remove unused verify response function. 2016-06-12 20:44:40 -04:00
fa36a449e9 Change HTTPException to only take a single parameter. 2016-06-12 13:57:05 -04:00
8e5347f4ed Allow datetime in limit parameters for logs_from.
Add time_snowflake to convert a datetime to a "snowflake".
2016-05-20 18:11:56 -04:00
0c8d5ee863 Force encoding of text retrieval functions to use utf-8.
Closes #207
2016-05-10 19:52:34 -04:00
fda0c8cea0 Add compatibility layer for run_coroutine_threadsafe.
This is a breaking change, since discord.utils.create_task is moved
to discord.compat.create_task.
2016-04-25 20:52:16 -04:00
bd5effeb68 Add optional redirect_uri parameter to utils.oauth_url 2016-04-18 00:47:55 -04:00
a2a5dc5997 Add optional server parameter to utils.oauth_url 2016-04-15 21:04:33 -04:00
eedad13ac1 Add utility function for generating OAuth2 urls. 2016-04-08 22:51:57 -04:00
d133f9f761 Clean up documentation of utils.snowflake_time 2016-03-06 03:42:13 -05:00
612aa4d107 Add util method to extract creation date from discord ids 2016-03-06 03:40:16 -05:00
4d816c4ef3 HTTPException now has a text attribute if JSON is not available. 2016-01-25 01:16:14 -05:00
e88bc28236 Documentation fixes to quiet Sphinx warnings. 2016-01-07 00:21:00 -05:00
89a418a388 Add __slots__ for missing classes that didn't have it. 2016-01-06 23:40:20 -05:00
db4cc791dd Update license of files to 2016. 2016-01-04 22:28:29 -05:00
c69a991e46 Maintain order in role related functions. 2015-12-30 16:11:15 -05:00
7765580a14 utils.get now supports nested attribute retrieval. 2015-12-30 14:48:34 -05:00
9f92536441 Clean-up documentation to use NumPy style docs on remaining classes. 2015-12-16 22:20:54 -05:00
de1c74a399 Make more things into properties.
A lot of the expensive getters were transformed into cached properties
instead. A lot of things that were properties were transformed into
properties as well.
2015-12-16 22:03:16 -05:00
338fb3e504 Add discord.utils.get helper. 2015-12-13 02:13:08 -05:00
9102f1ae4f Work on connecting to a voice channel. 2015-12-07 16:22:56 -05:00
b87dfccfce Add server management commands. 2015-12-04 23:35:28 -05:00
99254fdf96 Add Forbidden and NotFound exceptions. 2015-12-04 01:23:52 -05:00
f197c34583 Begin working on asyncio port. 2015-12-04 00:16:34 -05:00
4a25011ee1 Revert "GIF support for avatars"
This reverts commit 9a5bb439ec.
2015-11-26 23:12:10 -05:00
9a5bb439ec GIF support for avatars 2015-11-26 22:55:26 -05:00
f0617fbb6a Add support for uploading avatars. 2015-11-26 22:14:04 -05:00
077817c126 Move _null_event and _verify_successful_response to utils
They might be used in other files in the future.
2015-11-26 21:09:50 -05:00
f59ab28741 Add utils.find helper function. 2015-09-13 22:28:02 -04:00
b4e6591c9d Refactor parse_time into its own utils file. 2015-09-04 22:00:22 -04:00