2022 Commits

Author SHA1 Message Date
Rapptz
d9960dd421 animation field in reaction objects are not consistently available 2019-11-18 19:12:01 -05:00
Rapptz
c6f6fdf2f5 Version bump to 1.2.4 v1.2.4 2019-10-17 20:48:44 -04:00
Rapptz
1fdd41cfcd Add changelog for v1.2.4 2019-10-17 20:48:44 -04:00
Xua
f92dcc0820 Prevent premium_subscription_count being None 2019-10-17 20:25:45 -04:00
Rapptz
e6d6962145 Fix breakage with webhook tokens being missing. 2019-10-17 20:23:39 -04:00
Jake
b4c2b2c065 use proper ip for endpoint ip 2019-10-17 20:23:24 -04:00
Rapptz
f37f3b8212 Properly populate __slots__ for derived user types.
Fixes #2265
2019-10-17 20:21:33 -04:00
Rapptz
6ed5a21a78 Fix regression where Message.edited_at would not update during edits 2019-10-17 20:21:10 -04:00
Rapptz
a69738b635 Fix regression with unresolved channels due to reordering.
Channels are meant to fallback to Object if the message is out of
order. Somewhere along the commit line this got removed despite the
issue still existing.
2019-10-17 20:19:53 -04:00
Rapptz
0cf38241d0 Version bump to 1.2.3 v1.2.3 2019-06-25 21:50:28 -04:00
Rapptz
1e982e0042 Cast activity enumerator to integer instead of accessing value directly
Should make the library more resilient to future changes.
2019-06-25 21:50:06 -04:00
Rapptz
a136def52f Translation sync from crowdin 2019-06-22 10:23:38 -04:00
Rapptz
8f691ae775 Only return exception in Client.run when it's not cancelled. 2019-06-20 23:04:38 -04:00
Rapptz
b2f247bef3 Propagate exception in Client.run
Fix #2237
2019-06-20 23:00:45 -04:00
Imayhaveborkedit
20fa3001f2 Raise max encoder bitrate to 512kbps
Any higher is useless for opus anyways.
2019-06-20 22:52:47 -04:00
Harmon
94c0cb0d5c [commands] Add missing word in HelpCommand documentation 2019-06-20 22:52:47 -04:00
Benjamin Mintz
850a0431bf Catch asyncio.CancelledError in 3.8 in typing context manager
In python 3.8, asyncio.CancelledError is a subclass of BaseException
rather than Exception, so `except Exception:` will not swallow
CancelledError. This change prevents an error in 3.8 from being printed
to the console when the following is run:

```
async with ctx.typing():
	pass
```
2019-06-20 22:51:28 -04:00
Rapptz
671a19a24a [commands] Ensure cooldowns are properly copied. 2019-06-12 23:40:43 -04:00
NCPlayz
dfcf9cdb0a Rename error type for X.fetch_channel(s). 2019-06-12 00:47:42 -04:00
Reece Dunham
34b93c757c docs: Fix minor typo 2019-06-12 00:47:42 -04:00
SnowyLuma
2b4cf5dafc Set premium_since when copying and updating Member 2019-06-11 21:13:43 +02:00
Rapptz
e00635fba7 Version bump to 1.2.2 v1.2.2 2019-06-09 21:51:43 -04:00
Toby Harradine
e3e2e38511
Update docs to note Enum derivation change 2019-06-10 00:53:10 +10:00
Rapptz
3730e66d37 Crowdin translation sync 2019-06-09 08:20:43 -04:00
Rapptz
855a6c5b59 Fix descriptor detection in enum code. 2019-06-09 08:13:29 -04:00
Rapptz
7980213745 Version bump to 1.2.1 v1.2.1 2019-06-09 02:18:43 -04:00
Rapptz
2b761508f1 Disallow deleting of enum attributes. 2019-06-09 02:13:40 -04:00
Rapptz
6931189b92 Add EnumMeta.__reversed__ just in case someone does this.
I sure hope not.
2019-06-09 02:02:06 -04:00
Rapptz
a92b4c2093 Add EnumMeta.__len__ to not break user avatar code. 2019-06-09 01:59:23 -04:00
Rapptz
af4e3ad79b Some documentation touch-ups and missing stuff in the changelog. 2019-06-09 01:24:41 -04:00
Rapptz
d7814cfb25 Remove unused import. 2019-06-09 01:06:20 -04:00
Rapptz
a8f0a03247 Version bump to 1.2.0 v1.2.0 2019-06-09 00:39:38 -04:00
Rapptz
655aa39603 Fix reference typo in SystemChannelFlags 2019-06-09 00:38:46 -04:00
Rapptz
7e2da1c93b Publicly expose a type property for all channels.
Fix #2185
2019-06-09 00:23:22 -04:00
Rapptz
991140eebe Replace Enum with an internal one for significant speed improvements.
This has been a massive pain point for me personally due to the poor
design of the Enum class leading to the common use cases used in the
library being significantly slow. Since this Enum is not public facing
in terms of *creation*, I can only implement the APIs that are used
when *accessing* them.

This Enum is a drop-in replacement to the pre-existing enum.Enum class
except it comes with significant speed-ups. Since this is a lot to go
over, I will let the numbers speak for themselves:

In [4]: %timeit enums.try_enum(enums.Status, 'offline')
263 ns ± 34.3 ns per loop (7 runs, 1000000 loops each)
In [5]: %timeit NeoStatus.try_value('offline')
134 ns ± 0.859 ns per loop (7 runs, 10000000 loops each)

In [6]: %timeit enums.Status.offline
116 ns ± 0.378 ns per loop (7 runs, 10000000 loops each)
In [7]: %timeit NeoStatus.offline
31.6 ns ± 0.327 ns per loop (7 runs, 10000000 loops each)

In [8]: %timeit enums.Status.offline.value
382 ns ± 15.2 ns per loop (7 runs, 1000000 loops each)
In [9]: %timeit NeoStatus.offline.value
65.5 ns ± 0.953 ns per loop (7 runs, 10000000 loops each)

In [10]: %timeit str(enums.Status.offline)
630 ns ± 14.8 ns per loop (7 runs, 1000000 loops each)
In [11]: %timeit str(NeoStatus.offline)
253 ns ± 3.53 ns per loop (7 runs, 1000000 loops each)

In [12]: %timeit enums.Status('offline')
697 ns ± 8.42 ns per loop (7 runs, 1000000 loops each)
In [13]: %timeit NeoStatus('offline')
182 ns ± 1.83 ns per loop (7 runs, 10000000 loops each)
2019-06-09 00:06:34 -04:00
Rapptz
8bf0482af5 Fix exception hierarchy documentation. 2019-06-08 21:23:42 -04:00
NCPlayz
126f4f8271 Implement Guild.get_all_premium_subscribers 2019-06-08 21:19:10 +01:00
Rapptz
c97b097f07 Document new Guild.features 2019-06-07 22:26:05 -04:00
Rapptz
f84219c2b2 Improve performance of parsing MESSAGE_UPDATE and MESSAGE_CREATE events
Embed edits are no longer special cased in the dispatch code, which
could lead to on_message_edit being called more often than it used to
be called. I am not sure on the general impact on that being removed.

Fixes #2195
2019-06-07 22:18:01 -04:00
NCPlayz
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
NCPlayz
2f05436653 Added comment for/redo system information 2019-06-07 19:23:44 -04:00
NCPlayz
f7c6c5995d Implementing GET '/channels/:id' & '/guilds/:id/channels'
Signed-off-by: NCPlayz <chowdhurynadir0@outlook.com>
2019-06-07 19:12:59 -04:00
Rapptz
320dbc0618 Add support for system channel flags 2019-06-06 22:30:02 -04:00
Rapptz
fcf02414fe Fix stray colon in Asset related docstrings 2019-06-04 19:06:31 -04:00
Rapptz
9674055c2a Add support for animated guild icons. 2019-06-04 19:04:44 -04:00
Rapptz
5dce3410e6 Add support for new message types related to premium guilds. 2019-06-04 18:30:47 -04:00
Rapptz
2b27a7a9d5 Add Member.premium_since to denote member boost date. 2019-06-04 18:30:46 -04:00
Rapptz
8e80eee0d1 Add Emoji.available field 2019-06-04 18:30:46 -04:00
Rapptz
a048815c60 Add Guild.premium_subscription_count 2019-06-04 18:30:46 -04:00
Rapptz
e40c68b75a Add Guild.premium_tier and corresponding limits. 2019-06-04 18:30:46 -04:00