100 Commits

Author SHA1 Message Date
NCPlayz
a1caaf8dcf Add Guild.max_presences and Guild.max_members
Fixes #1822
Fixes #1418
2019-03-22 20:25:03 -04:00
NCPlayz
8a30a4cac0 Add support for guild widget 2019-03-19 09:22:48 -04:00
NCPlayz
f507f508a2 Expose Metadata
Added access to:
* `/users/@me/guilds`
* `/guilds/{guild_id}`
* `/guilds/{guild_id}/members/{member_id}`

BREAKING CHANGE:
* `get_user_info` -> `fetch_user_info` to match naming scheme.

Remove useless note

Remove `reverse` and corresponding documentation

Update documentation to reflect #1988

Rename `get_` HTTP functions to `fetch_`

Breaking Changes:
* `get_message` -> `fetch_message`
* `get_invite` -> `fetch_invite`
* `get_user_profile` -> `fetch_user_profile`
* `get_webhook_info` -> `fetch_webhook`
* `get_ban` -> `fetch_ban`

Fix InviteConverter, update migrating.rst

Rename get_message to fetch_message
2019-03-19 09:00:18 -04:00
NCPlayz
fb02191b80 Organise documentation 2019-03-19 08:24:42 -04:00
Rapptz
5061915b2a Add support for store channels. 2019-03-17 14:32:51 -04:00
Jeremy "EndenDragon" Zhang
682c0d962f Consider news channel type as a TextChannel 2019-03-16 23:02:46 -04:00
Nadir Chowdhury
8f7ce7c64e Add support for reading guild descriptions
Added `Guild.description` and `PartialInviteGuild.description`.
2019-03-13 21:24:16 -04:00
SnowyLuma
42a7c4f7e5 Add support for guild banners
Document banner attribute of Guild and Invite

Update discord/utils.py

Co-Authored-By: SnowyLuma <38926001+SnowyLuma@users.noreply.github.com>
2019-03-09 00:37:49 -05:00
Tarek1337
616616b847 Add support for guild descriptions 2019-03-08 21:45:43 -05:00
numbermaniac
5516b0b2c9 guild.py: change word in create_role's docstring 2019-03-08 19:59:20 -05:00
Rapptz
5d78f43e55 Expose more information from partial invites, along with counts.
This adds the following information.

* `PartialInviteGuild` to replace `Object` patching
* `PartialInviteChannel` to replace `Object` patching
* Invite.approximate_member_count and Invite.approximate_presence_count

The new partial objects provide better documentation on what is
expected when you fetch random invites.

Fixes #1830
2019-02-12 20:22:47 -05:00
Dante Dam
9656a21ebe Bumped copyright years to 2019. 2019-01-28 22:22:50 -05:00
Tyler
febb8a965c Allow additional parameters on channel creation 2019-01-28 21:47:22 -05:00
Rapptz
b79a53cae4 Fix typo in exception message in Guild.edit 2018-12-17 22:33:07 -05:00
Rapptz
648e62031d Add support for explicit_content_filter in Guild.edit 2018-12-17 18:04:32 -05:00
Rapptz
c7396dc8ac Add support for mobile indicators and per-client statuses. 2018-12-14 20:57:21 -05:00
Rapptz
e6a8eb1a7c Fix bug in Guild.splash_url 2018-11-26 02:04:01 -05:00
Rapptz
8b18fa307b Add support for default notification level in audit logs and Guild.edit 2018-11-25 01:42:33 -05:00
Chris
1ac432d9f0 Add Guild.default_notifications 2018-11-24 23:05:26 -05:00
SnowyLuma
e89e7dfe93 Add support for multiple activities 2018-11-24 22:36:52 -05:00
Hornwitser
0e7b378151 [lint] Remove extra whitespace in guild.py
Remove trailing whitespace in guild.py introduced by 3727ea9.
2018-11-24 22:17:58 -05:00
Hornwitser
efb4ff850e [lint] Fix import order
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
2018-11-24 22:17:58 -05:00
Matt (IPv4)
3727ea9811 Add Guild.splash_url_as 2018-10-11 02:38:52 -04:00
Rapptz
1da6962580 Fix up Guild.create_custom_emoji docstring. 2018-10-03 05:45:55 -04:00
MusicOnline
60d86b6c1a Add note regarding MORE_EMOJI in Guild.create_custom_emoji 2018-10-03 14:42:04 +08:00
MusicOnline
2f84d05f0b Correct Guild.create_custom_emoji documentation 2018-10-02 21:09:07 +08:00
Rapptz
3d03dbc451 Change internal role storage in Guild to a dict instead of a list.
This adds the following APIs:

* Guild.get_role

This removes the following APIs:

* Guild.role_hierarchy

To compensate for the removed APIs, Guild.roles is now a sorted list
based on hierarchy. The first element will always be the @everyone
role.

This speeds up access at the cost of some memory, theoretically.
2018-09-24 21:08:48 -04:00
Vexs
262c0d3a9e Correct note note about editing emoji in Guild.create_custom_emoji.
Remove incorrect note; extension of #1575
2018-09-20 23:45:15 -04:00
Rapptz
5c24e69cf2 Fix up the Sphinx strings causing warnings. 2018-09-15 09:54:00 -04:00
PikalaxALT
0e6082c57d Implement roles kwarg for guild.create_custom_emoji and emoji.edit 2018-08-22 21:06:09 -04:00
bmintz
ec3435b224 Remove remaining asyncio.coroutine calls.
Also remove Client.async_event
2018-07-05 03:45:58 -04:00
Rapptz
f25091efe1 Drop support for Python 3.4 and make minimum version 3.5.2. 2018-06-10 18:10:00 -04:00
Steve C
0e945915b7 Fixes various documentation errors/inconsistencies
Mostly dealing with permissions, also fixes Raw Events inclusion.
2018-05-18 20:25:54 -04:00
Rapptz
07a535f514 Document user parameter in Guild.get_ban 2018-05-08 22:03:30 -04:00
slice
9fe7776a33
Add support for getting individual ban entries 2018-05-07 16:42:04 -07:00
Rapptz
95de4d1df1 Actually fix the order in Guild.by_category. 2018-03-31 23:16:53 -04:00
Rapptz
87a7efc410 Flip comparison in Guild.by_category. 2018-03-31 22:55:42 -04:00
Rapptz
796ff6d7e6 Sort voice channels below text channels in Guild.by_category 2018-03-25 04:00:47 -04:00
Rapptz
f8f8f418f3 Split Game object to separate Activity subtypes for Rich Presences.
This is a massive breaking change.

* All references to "game" have been renamed to "activity"
* Activity objects contain a majority of the rich presence information
* Game and Streaming are subtypes for memory optimisation purposes for
  the more common cases.
* Introduce a more specialised read-only type, Spotify, for the
  official Spotify integration to make it easier to use.
2018-03-05 11:15:49 -05:00
Tobotimus
3112e1c17e Add intersphinx 2018-01-06 17:23:59 -05:00
Pandentia
b22f7c76c5 Further clarify how bots can interact with emoji endpoints
Clarifies that bot accounts can only interact with emoji they have
created.
2017-10-03 00:22:06 +02:00
Pandentia
51a696e674 Remove reference to "whitelisted" bots for emoji endpoints
Due to a recent change in the Discord API, bots can now create
guild-specific emoji, so I've removed the parts of the documentation
referencing this restriction.
2017-10-03 00:10:01 +02:00
Rapptz
711dfb83ab Allow creating a channel with a category. 2017-09-29 05:54:29 -04:00
Rapptz
6d6ce14d7c Fix Guild.system_channel always returning None.
Fixes #811
2017-09-26 22:56:26 -04:00
Rapptz
148816c4e8 Temporarily add created channels to cache.
This should fix issues when doing a `abc.GuildChannel.edit` immediately
afterwards and then when the corresponding CHANNEL_CREATE comes in the
channel instance should hopefully be overwritten by the authoritative
figure, the WebSocket.
2017-09-23 18:54:12 -04:00
Rapptz
95c28f08e4 Fix sorting for channels. 2017-09-21 00:11:36 -04:00
Jake
3e00e7fe8a [guild] use a defaultdict in by_category 2017-09-20 21:08:46 -07:00
Rapptz
7b2e06c263 Fix error when creating guild channels. 2017-09-13 18:47:40 -04:00
Rapptz
7df8897e3d Add Guild.create_category.
An alias, Guild.create_category_channel is provided.
2017-09-13 17:01:42 -04:00
Rapptz
53b4890435 Add category support.
This adds:

* CategoryChannel, which represents a category
* Guild.by_category() which traverses the channels grouping by category
* Guild.categories to get a list of categories
* abc.GuildChannel.category to get the category a channel belongs to
* sync_permissions keyword argument to abc.GuildChannel.edit to sync
  permissions with a pre-existing or new category
* category keyword argument to abc.GuildChannel.edit to move a channel
  to a category
2017-09-13 09:44:36 -04:00