Commit Graph

1862 Commits

Author SHA1 Message Date
dab2519a09 Implement TextChannel.follow() 2019-11-15 04:23:15 -05:00
Xua
4c3e53edf4 Fix webhooks not re-raising after retries run out 2019-10-20 05:20:15 -04:00
30c9e33384 [docs] category_id is Optional 2019-10-20 05:20:15 -04:00
bc642ded6e [commands] Allow converters from custom discord.ext extensions
Originally the converting of an argument with type in the discord.*
package would try to use the predefined converters, even if there were
none present. This is fixed by supplying a default argument to getattr

Fixes #2369
2019-10-20 05:19:03 -04:00
f273199d57 Refactor name kwarg for Emoji.edit() 2019-10-20 05:19:03 -04:00
Xua
f912758a1f Prevent premium_subscription_count being None 2019-10-17 05:56:01 -04:00
2a0766795f Make Guild.default_role use get_role.
Prevents some stale caching by using the new O(1) Guild.get_role.
2019-10-17 05:56:01 -04:00
b63f4f7032 Add MEMBER_LIST_DISABLED to docs for Guild.features 2019-10-17 05:56:01 -04:00
07840db053 Document Command.cog property 2019-10-17 05:56:01 -04:00
6241983a99 Add europe region 2019-10-17 05:56:01 -04:00
e67c260f3e The LURKABLE feature has been renamed to PUBLIC 2019-09-21 18:43:52 +02:00
c6539bbc61 Reaction's emoji can be a partial one too 2019-09-19 21:24:47 -04:00
3cef1e09f8 Add Emoji.is_usable() 2019-09-19 21:24:16 -04:00
8240454555 Add self_stream property to VoiceState object. 2019-09-19 21:21:54 -04:00
017d428db5 Fix discord.Object type hinting docs
discord.Object requires ID as an int not str
2019-09-19 21:15:41 -04:00
b4358d0dcf [docs] You can upload gifs using guild.edit()
Only if it has ANIMATED_ICON feature.
2019-09-10 21:10:59 -04:00
1dddb66a1e [commands] default Bot.owner_ids to a set
This appears to be a typo, as everywhere else, owner_ids is set to a set.
2019-09-10 21:10:59 -04:00
7f65d9a8b1 [tasks] Add support for passing an argument list of exceptions. 2019-09-10 21:10:59 -04:00
5022aa5a0b Fix broken versionadded in Message.is_system() 2019-09-10 21:10:58 -04:00
bc147ea37b Fix FFmpegAudio._process not existing if _spawn_process raises 2019-08-27 19:53:44 -04:00
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
1c6c26ee38 Fix bucket key to not have the method in there. 2019-08-27 18:41:32 -04:00
078d1d71d8 Use new rate limit millisecond precision option. 2019-08-27 18:41:31 -04:00
5d7cf56d7f Actually add things to the message cache. 2019-08-27 18:36:40 -04:00
5c0b127c96 Create Permissions and Colour objects when necessary in Role
This should have some memory savings of ~24 bytes per role.

* 8 bytes for Permissions
* 8 bytes for Colour
* 8 bytes for the alias

I'm not sure how significant it is but it should be a decent amount.
2019-08-27 18:34:40 -04:00
828e8189d3 Fix _get_message returning the message cache. 2019-08-27 17:44:22 -04:00
7d7eabb974 Make permissions_synced actually return False
The code before this returned None when there is no category.
2019-08-27 17:43:33 -04:00
2f7e875a76 Strip tokens before use.
Closes #2135
2019-08-27 04:59:17 -04:00
cf79816c5d Allow disabling the message cache with max_messages=None
This also changes the default to 1000 instead of 5000 since it can
take some time for small bots to cycle through the default and they
make up the majority of it.
2019-08-27 04:50:50 -04:00
1488957a6f Add Message.is_system to more intuitively filter system messages. 2019-08-27 04:13:46 -04:00
3dc9f40be7 Add versionadded string to GuildChannel.permissions_synced 2019-08-27 04:06:27 -04:00
da4bb0610c Add CHANNEL_FOLLOW_ADD Message Type
Add documentation for MessageType.channel_follow_add

Add versionchanged to new MessageType attr

Add system_content for new MessageType
2019-08-27 04:05:03 -04:00
125a5676b8 Add permissions_synced to abc.GuildChannel
This allows users to check whether or not the permissions for a Guild Channel are synced with the permissions for its category. Discord automatically syncs the permissions when the overwrites are equal so just checking if the two overwrites are equal will determine if they are synced.
2019-08-27 03:49:33 -04:00
87c2508199 Explicitly mention discord.Object in abc.Snowflake documentation. 2019-08-11 20:12:32 -04:00
f513d831d1 Add RawReactionActionEvent.event_type attribute.
This helps differentiate between reaction removal or addition.
2019-08-11 19:11:22 -04:00
ceaba01776 Add version information from missing PRs. 2019-08-11 19:04:39 -04:00
9f822a1e6d [tasks] Add support for explicit time parameter when running.
Fixes #2159
2019-08-11 18:57:49 -04:00
2c99198033 Add channel_id to RawMessageUpdateEvent 2019-08-11 18:54:25 -04:00
c7a1f5e6e9 Disambiguate and normalize documentation for non-bot only methods 2019-08-11 18:50:31 -04:00
c7d3ebb400 [commands] Add role cooldown bucket 2019-08-11 18:44:16 -04:00
12343c1422 Add versionadded tags to new ffmpeg related classes. 2019-07-27 23:17:06 -04:00
7a8c9e66d9 [tasks] Add Loop.exception for more reliable exception retrieval. 2019-07-27 23:07:48 -04:00
46f6003c66 Version bump for development purposes. 2019-07-27 22:42:04 -04:00
cddcc6d6b6 abc.Messageable do not have to implement abc.Snowflake
Fix #2290
2019-07-27 22:38:30 -04:00
dd12fbf73d [commands] Properly load the original module when reloading fails.
Fix #2291
2019-07-27 22:37:55 -04:00
8e594ac1ad Escape quote markdown in utils.escape_markdown 2019-07-27 22:14:14 -04:00
18fe2035ef Document that the cache retrieval functions require an int ID.
Closes #2285
2019-07-23 04:01:14 -04:00
45375364b7 Fix breakage with webhook tokens being missing. 2019-07-22 20:55:43 -04:00
fedf26bf3e Add FFmpegOpusAudio and other voice improvements
Rework FFmpeg player and add FFmpegOpusAudio

I have extracted some of the base FFmpeg source code into its own
base class and reimplemented the PCM and the new Opus variants.

Support avconv probing

Also fix a few things

Update `__all__`

Fix the bugs

Rework probe functions and add factory function

Probing involves subprocess so it has been reworked into an async
factory function.

Add docs + a few tweaks

* Removed unnecessary read() and is_opus() functions from FFmpegAudio
* Clear self._stdout in cleanup()
* Add 20 second process communication timeout to probe functions
* Capped probe function bitrate values at 512

Change AudioPlayer to use more accurate, monotonic time.perf_counter()

Add lazy opus loading

The library now no longer loads libopus on import, only on
opus.Encoder creation or manually.

Fix review nits
2019-07-22 20:46:40 -04:00
042a234eac [commands] update sys.modules in load_extension again
6f71552c50 introduced a regression: loading a module that is not in a package
does not add it to sys.modules. Updating sys.modules is required after all.
2019-07-18 18:06:43 -04:00