Milo Mirate
21c88cf727
Make Permissions partially-ordered.
Specifically:
* P1 <= P2 iff P1 expresses a subset of the permissions expressed by P2.
* P1 < P2 iff P1 <= P2 and P1 != P2
* vice versa for P1 >= P2 and P1 > P2
9 years ago
Khazhismel Kumykov
7bae6dc5bc
Fix changing own nickname without manage_nicknames
Use @me/nick rather than id when changing own nickname - this only
requires change_nicknames rather than manage.
9 years ago
Rapptz
5e8c79bf76
Attempt to consistently sort of all Member.roles
9 years ago
Rapptz
47cccba946
Remove setting read-only __doc__ in Member overrides.
9 years ago
Rapptz
ebaf74e784
Sort member.roles by ID but keep the default role in index 0.
This should make the events checking if `before` and `after` roles
are equivalent more sane for users.
9 years ago
Rapptz
e2bfa90eef
Add User.mentioned_in helper to check if a message mentions you.
9 years ago
Rapptz
3758c0aa83
Member.mention now uses nickname hint if needed.
9 years ago
Rapptz
196e9463f5
Add Role.mentionable attribute.
9 years ago
Khazhismel Kumykov
29b01f20ba
Fix Member.display_name returning None
If Member.nick was None, getattr would happily return None, not the
default value.
9 years ago
Rapptz
7f09acf871
[commands] Allow role mentions to work with discord.Role params.
This also fixes the Member regex to support the new <@!user_id> syntax
and allows colours to have a leading # before the number.
9 years ago
Rapptz
e112536ce2
Simplify User.display_name a bit.
9 years ago
Rapptz
85806ef1d6
Handle nicknames in Server.get_member_named
9 years ago
Rapptz
79f6554289
Add Message.role_mentions and handle them in Message.clean_content
9 years ago
Rapptz
abb955fdaa
Add Role.mention property
9 years ago
Rapptz
07adb1d5e9
Add ability to change nicknames via Client.change_nickname
9 years ago
Rapptz
133e8d3a44
Add support for server specific nicknames.
9 years ago
Rapptz
cc78cfedb6
Add permissions for changing or managing nicknames.
9 years ago
Rapptz
c1b5a52823
Refactor voice websocket into gateway.py
9 years ago
Rapptz
1c623ccf11
Begin working on gateway v4 support.
Bump websockets requirement to v3.1
Should be squashed...
9 years ago
Rapptz
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.
9 years ago
Rapptz
e0ca746ad4
[commands] Make sure that mentions are the entire string.
9 years ago
Rapptz
54e9be7aed
Message.clean_content now takes into consideration @here mentions.
9 years ago
Daniel
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).
9 years ago
cookie
bd5effeb68
Add optional redirect_uri parameter to utils.oauth_url
9 years ago
Rapptz
8d7dd79673
Fix deadlock issue when joining large guilds.
9 years ago
Khazhismel Kumykov
a2a5dc5997
Add optional server parameter to utils.oauth_url
9 years ago
Rapptz
03862a7145
Add a None check when setting status in Client.change_status.
9 years ago
Rapptz
7adf761a35
Retry if send_message or edit_message encounter a 502.
9 years ago
Rapptz
054c9c7109
[commands] CommandError derived exceptions in checks don't crash help.
9 years ago
Rapptz
7eb9a7dfdc
Handle bot tag updates in GUILD_MEMBER_UPDATE.
9 years ago
Rapptz
53bc9a3007
Yield from parser coroutine instead of making it a task.
This should give us a bit better sequential message processing.
9 years ago
Rapptz
03041bdb0a
Add Channel.overwrites_for function to get allow/deny pairs.
9 years ago
Rapptz
7023b353f6
User JSON object has 'username' keys not 'name'.
9 years ago
Rapptz
5c407df2b7
Fix Client.login documentation to showcase email/password login.
9 years ago
Rapptz
28b3d375e9
Check the right status code for improper token being passed.
9 years ago
Rapptz
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.
9 years ago
Khazhismel
84f1342b85
Fix chunk requests not actually being batched.
9 years ago
Rapptz
0401ab561b
Proper chunking for unavailable guilds.
This will also delay on_ready until all chunking is complete.
10 years ago
Rapptz
29d3f5a886
Allow Client.edit_profile to work with bot accounts.
10 years ago
Rapptz
fa14c72836
Add User.bot attribute to check if a user is a bot account.
10 years ago
Khazhismel Kumykov
9f722731dd
Fix typo in Role.created_at
10 years ago
Rapptz
eedad13ac1
Add utility function for generating OAuth2 urls.
10 years ago
Rapptz
72e84a1b47
Change all email/password pair examples to use token.
10 years ago
Rapptz
93edf88ee4
Change login, start and run to be variadic.
10 years ago
Rapptz
222a89a653
Fix unclosed response and document token login a bit better.
10 years ago
Max Gurela
7f340f88ad
Add support for token login (for bots)
10 years ago
Rapptz
e64787a415
Guard against AttributeErrors when clearing cached slot cache.
10 years ago
Rapptz
dfd51b95d6
Make Message.clean_content a cached property again.
Instead, clear the cached properties so they will be re-cached when
invoked again.
10 years ago
Zeta
f235dc5ca4
Fix handling of message update in MESSAGE_UPDATE
10 years ago
Khazhismel Kumykov
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.
10 years ago