aboutsummaryrefslogtreecommitdiff
path: root/discord/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Add Guild.splash_url_asMatt (IPv4)2018-10-111-2/+2
|
* Change internal representation of roles in Member and Emoji.Rapptz2018-09-241-1/+33
| | | | | | | | | | | | | | | 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.
* Change docstrings to raw-stringsBeatButton2018-09-141-1/+1
|
* [lint] Remove unused variablesHornwitser2018-08-221-1/+1
| | | | Left over from various refactoring and rewrites.
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-101-11/+8
|
* Fix TypeError in utils.oauth_urlReinaSakuraba2017-10-041-1/+1
|
* Change how coroutines are detected internally.Rapptz2017-09-161-3/+4
|
* Fix utils.get example.Rapptz2017-08-301-1/+1
|
* Add webhook support.Rapptz2017-08-211-0/+6
| | | | | | | Allows for usage of either `requests` and `aiohttp` when used in "Standalone" mode. Fixes #704
* allow trailing null bytes in uploaded jpegskhazhyk2017-07-251-1/+1
|
* avatar_url_as improvementskhazhyk2017-07-251-0/+4
| | | | | | | | | | | | | | | | | | | 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. :\
* Implement "partial" message events.Rapptz2017-06-091-3/+1
| | | | | These are events that get triggered regardless of the state of the message cache. Useful for getting data from before the bot was booted.
* Use Python3Lexer instead of PythonLexer for pygments.Rapptz2017-05-221-3/+3
|
* Remove unused imports.Rapptz2017-04-181-1/+1
|
* Wrap asyncio.wait into a saner alternative that raises TimeoutError.Rapptz2017-02-251-0/+7
| | | | Fixes #494
* Allow utils.maybe_coroutine to take any arguments.Rapptz2017-02-131-3/+3
|
* Implement async checks. Fixes #380.Rapptz2017-02-121-0/+16
|
* Update copyright year to 2017.Rapptz2017-01-201-1/+1
|
* Allow uploading of GIFs for users.SunDwarf2017-01-081-0/+2
| | | | | | | 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 <[email protected]>
* Rename Server to Guild everywhere.Rapptz2017-01-031-10/+10
|
* Switch IDs to use int instead of strRapptz2017-01-031-3/+10
|
* Add support for "Do Not Disturb" and "Invisible" statuses.Rapptz2016-09-261-0/+16
| | | | | This deprecates Client.change_status in favour of the newer and more correct Client.change_presence.
* Remove unused verify response function.Rapptz2016-06-121-18/+0
|
* Change HTTPException to only take a single parameter.Rapptz2016-06-121-5/+4
|
* Allow datetime in limit parameters for logs_from.Khazhismel Kumykov2016-05-201-0/+18
| | | | Add time_snowflake to convert a datetime to a "snowflake".
* Force encoding of text retrieval functions to use utf-8.Rapptz2016-05-101-2/+2
| | | | Closes #207
* Add compatibility layer for `run_coroutine_threadsafe`.Rapptz2016-04-251-4/+0
| | | | | This is a breaking change, since discord.utils.create_task is moved to discord.compat.create_task.
* Add optional redirect_uri parameter to utils.oauth_urlcookie2016-04-181-1/+6
|
* Add optional server parameter to utils.oauth_urlKhazhismel Kumykov2016-04-151-2/+6
|
* Add utility function for generating OAuth2 urls.Rapptz2016-04-081-0/+19
|
* Clean up documentation of utils.snowflake_timeRapptz2016-03-061-3/+1
|
* Add util method to extract creation date from discord idsKhazhismel2016-03-061-0/+7
|
* HTTPException now has a text attribute if JSON is not available.Rapptz2016-01-251-5/+11
|
* Documentation fixes to quiet Sphinx warnings.Rapptz2016-01-071-1/+1
|
* Add __slots__ for missing classes that didn't have it.Rapptz2016-01-061-0/+22
|
* Update license of files to 2016.Rapptz2016-01-041-1/+1
|
* Maintain order in role related functions.Rapptz2015-12-301-0/+5
|
* utils.get now supports nested attribute retrieval.Rapptz2015-12-301-3/+15
|
* Clean-up documentation to use NumPy style docs on remaining classes.Rapptz2015-12-161-3/+8
|
* Make more things into properties.Rapptz2015-12-161-0/+15
| | | | | | 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.
* Add discord.utils.get helper.Rapptz2015-12-131-0/+46
|
* Work on connecting to a voice channel.Rapptz2015-12-071-0/+4
|
* Add server management commands.Rapptz2015-12-041-0/+7
|
* Add Forbidden and NotFound exceptions.Rapptz2015-12-041-2/+7
|
* Begin working on asyncio port.Rapptz2015-12-041-3/+10
|
* Revert "GIF support for avatars"Rapptz2015-11-261-2/+0
| | | | This reverts commit 9a5bb439ec9f6ab5d2fce7567452ca310736d688.
* GIF support for avatarsRapptz2015-11-261-0/+2
|
* Add support for uploading avatars.Rapptz2015-11-261-1/+9
|
* Move _null_event and _verify_successful_response to utilsRapptz2015-11-261-0/+10
| | | | They might be used in other files in the future.
* Add utils.find helper function.Rapptz2015-09-131-0/+23
|