Commit Graph

566 Commits

Author SHA1 Message Date
54e9be7aed Message.clean_content now takes into consideration @here mentions. 2016-04-23 02:13:33 -04:00
5a2b8e2ce6 Properly close session if client failed to start
`keep_alive` was not defined until it was created in `received_message`, `ws` is `None` until its actually connected, which doesn't always happen.  If an error happens before things start up properly, the client should now clean its objects up (fixes `unclosed client session` warning).
2016-04-22 22:40:25 -04:00
bd5effeb68 Add optional redirect_uri parameter to utils.oauth_url 2016-04-18 00:47:55 -04:00
8d7dd79673 Fix deadlock issue when joining large guilds. 2016-04-15 23:27:23 -04:00
cc23a54d58 Typo fix
Changed spelling of optinal to the correct spelling of optional in
docs\logging.rst
2016-04-15 21:53:35 -04:00
a2a5dc5997 Add optional server parameter to utils.oauth_url 2016-04-15 21:04:33 -04:00
03862a7145 Add a None check when setting status in Client.change_status. 2016-04-14 20:38:13 -04:00
7adf761a35 Retry if send_message or edit_message encounter a 502. 2016-04-14 13:16:27 -04:00
054c9c7109 [commands] CommandError derived exceptions in checks don't crash help. 2016-04-13 14:25:45 -04:00
7eb9a7dfdc Handle bot tag updates in GUILD_MEMBER_UPDATE. 2016-04-12 18:19:02 -04:00
53bc9a3007 Yield from parser coroutine instead of making it a task.
This should give us a bit better sequential message processing.
2016-04-12 18:18:03 -04:00
03041bdb0a Add Channel.overwrites_for function to get allow/deny pairs. 2016-04-12 13:10:43 -04:00
7023b353f6 User JSON object has 'username' keys not 'name'. 2016-04-11 14:39:04 -04:00
5c407df2b7 Fix Client.login documentation to showcase email/password login. 2016-04-11 14:30:44 -04:00
28b3d375e9 Check the right status code for improper token being passed. 2016-04-11 14:25:20 -04:00
6076c8c671 Better chunking behaviour and add members on PRESENCE_UPDATE.
This should hopefully cover all cases where members are added.
There was a bug where an array of chunks received would get entirely
processed if only a single chunk was received. This was fixed by
explicitly bailing early if we're requesting for chunks.
2016-04-11 14:24:15 -04:00
84f1342b85 Fix chunk requests not actually being batched. 2016-04-11 11:53:54 -04:00
0401ab561b Proper chunking for unavailable guilds.
This will also delay on_ready until all chunking is complete.
2016-04-10 00:47:00 -04:00
29d3f5a886 Allow Client.edit_profile to work with bot accounts. 2016-04-09 21:42:26 -04:00
fa14c72836 Add User.bot attribute to check if a user is a bot account. 2016-04-09 21:42:25 -04:00
9f722731dd Fix typo in Role.created_at 2016-04-09 02:33:09 -04:00
eedad13ac1 Add utility function for generating OAuth2 urls. 2016-04-08 22:51:57 -04:00
72e84a1b47 Change all email/password pair examples to use token. 2016-04-08 22:02:38 -04:00
93edf88ee4 Change login, start and run to be variadic. 2016-04-08 22:00:06 -04:00
222a89a653 Fix unclosed response and document token login a bit better. 2016-04-08 21:16:30 -04:00
7f340f88ad Add support for token login (for bots) 2016-04-08 21:11:22 -04:00
e64787a415 Guard against AttributeErrors when clearing cached slot cache. 2016-04-05 18:22:44 -04:00
dfd51b95d6 Make Message.clean_content a cached property again.
Instead, clear the cached properties so they will be re-cached when
invoked again.
2016-04-05 18:01:55 -04:00
f235dc5ca4 Fix handling of message update in MESSAGE_UPDATE 2016-04-05 18:01:54 -04:00
160cbc81e7 Clarify channel-specific permissions documentation.
Manage Roles and Manage Channels is renamed to "Manage Permissions" and
"Manage Channel" in the discord UI, clarify which fields in the Permission
object those map to.
2016-04-05 14:30:04 -04:00
0e91ef79ef Fix handling of unavailable servers in READY 2016-04-04 23:45:05 -04:00
82b2421ac7 [commands] Add deterministic cog unloading.
The special function is `__unload` to prevent with name conflicts with
existing or future cogs.
2016-04-04 04:45:15 -04:00
8b7f15ef8d Skip member_update event when a member is not in a guild. 2016-04-02 23:38:45 -04:00
4451091c91 [commands] Fix pagination logic a little inside HelpFormatter.
This should prevent pages accidentally reaching >2k chars.
2016-04-02 08:15:34 -04:00
d79a13d7bc [commands] Refactor special cased discord.py converters.
Code is a little more straightforward. The Member and Channel special
cases will now work in private message contexts when given a name. The
Member special case will also work if you pass in a name and
discriminator combo.
2016-04-01 07:27:39 -04:00
1a202bb6eb Add Server.get_member_named to help with name + discriminator lookups. 2016-04-01 05:59:58 -04:00
f93fa8a0b2 User.__str__ now includes the discriminator. 2016-04-01 05:48:31 -04:00
7fe5a54183 Clarify that linux users need libffi for PyNaCl. 2016-04-01 05:10:43 -04:00
ee4574a5e1 Drop voice packets when it can be potentially blocking. 2016-03-31 23:44:22 -04:00
10cb16a450 Add PyNaCl to the list of requirements. 2016-03-31 23:18:35 -04:00
719c0269f4 Encrypted audio working with PyNacl
I chose PyNacl since it came with its own libsodium portable copy.
2016-03-31 23:03:34 -04:00
c015e492d7 [commands] Don't yield from inside bot utility functions. 2016-03-31 20:09:20 -04:00
5f776f369d Add default avatar property to User. 2016-03-31 14:38:03 -04:00
174016c918 [commands] Fix infinite recursion on subgroups without a command.
Just as an FYI, ctx.invoked_subcommand will end up being an instance
    of commands.Group!
2016-03-31 05:34:51 -04:00
7dcf0c059c Clarify that Client.close is a coroutine. 2016-03-29 20:44:33 -04:00
53a240e0d3 Add Member.colour property to get rendered role colour of a member. 2016-03-27 15:12:05 -04:00
1a98e9235a Clarify Channel.position documentation. 2016-03-25 22:51:03 -04:00
0ad1cb95a3 Server.icon_url uses API url instead of the CDN. 2016-03-25 19:13:06 -04:00
827ca1e5a2 Add boolean option to specify if VoiceClient.play_audio should encode.
This allows people to send raw opus encoded data instead of being
forced to encode to Opus.
2016-03-25 19:12:59 -04:00
4fa1bcadaa Add a way to set ffmpeg options before the -i flag. 2016-03-25 18:49:23 -04:00