260 Commits

Author SHA1 Message Date
Rapptz
7bdaa793f6 Create temporary DMChannels from message create events
This allows for DMChannels to work without falling back to the
Object error case since there is enough information to build a pseudo
DMChannel object.

This is a breaking change since it changes the type of
DMChannel.recipient to Optional[User] for when this faux object is
created.
2021-04-11 22:09:10 -04:00
Rapptz
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
Rapptz
54288879e2 Remove userbot functionality
This has a lot of legacy and cruft so there may be some stuff I've
missed but this first pass is enough to get a clear separation.
2021-04-04 10:15:30 -04:00
Rapptz
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
Rapptz
efc30a146e Guard for None in VocalGuildChannel.members 2021-04-03 23:08:03 -04:00
Nadir Chowdhury
1b2688518e
Implement StageChannel and related methods 2021-04-03 22:43:41 -04:00
Tarek
6524869ddd
Implement voice region changing for voice channels 2021-04-01 03:49:45 -04:00
Rapptz
a30ad6acf2 Ignore moving category channels to another category 2021-03-30 03:51:06 -04:00
Sebastian Law
d6501159e7
[docs] copy signature from overridden and inherited methods 2021-03-29 23:52:14 -04:00
Nadir Chowdhury
427e387a2f
Deprecate non-bot methods 2021-02-23 03:36:37 -05:00
SuzuZusu
491b426205
Fix documentation with reference in GroupChannel.permissions_for 2021-02-17 04:16:38 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Rapptz
52d587d286 Allow PartialMessage to work with DM channels as well 2020-12-11 02:32:51 -05:00
Rapptz
3fe6d261f1 Add PartialMessage to allow working with channel/message_id pairs.
Fix #5905
2020-12-11 00:32:38 -05:00
Rapptz
44dc7a8e02 Add support for editing and deleting webhook messages.
Fix #6058
2020-12-09 20:15:35 -05:00
SebbyLaw
2e2560126f Implement icon_rl_as and cover_image_url_as for AppInfo 2020-11-21 21:11:47 -05:00
Michael
93fa46713a
Fix and add documentation 2020-09-23 03:19:35 -04:00
Nadir Chowdhury
e971e2f16c
Allow more methods to set an audit log reason 2020-06-30 23:35:42 -04:00
Skezza
c3bca7ec73
Documentation formatting 2020-06-30 23:32:00 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
NCPlayz
bd1420b5f0 Allow editing of channel types for news and text channels 2020-05-29 23:21:59 -04:00
Steve C
128c9f4eb8 Use GuildChannel abc for CategoryChannel edit
I noticed nothing happened when I did
`ch.edit(overwrites=oh.overwrites)`

`http.edit_channel` doesn't do anything with the `overwrites` keyword,
it's processed as `permission_overwrites` instead which `self._edit`
takes care of.

I feel this was an oversight at some point.
2020-05-10 17:00:24 -04:00
Harmon
6f9793fe5e Fixes and improvements for v1.3 documentation
* Add missing versionadded strings for v1.3
* Add missing versionchanged string for Message.edit
* Consistently use versionadded for attributes
* Consistently use versionchanged for parameters
* Use versionchanged for Bot.is_owner
* Fix references in v1.3 changelog
* Improve grammar in v1.3 changelog
2020-01-22 23:55:05 -05:00
Rapptz
02397306b2 Drop superfluous zero in version related changes in the documentation 2020-01-21 03:47:56 -05:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
Willy
43e38654e9
Added docs for overwrites kwarg for CategoryChannel.edit 2020-01-19 15:42:27 -05:00
Rapptz
a1d41f16d8 Document NotFound exception raise in message deletion endpoints 2020-01-18 21:37:06 -05:00
CapnS
072cef3bb6 Allow editing of overwrites in Channel.edit() 2019-12-04 18:40:38 -05:00
Naegin
cc2aecd3ff Fix 'purge' method docstring. 2019-11-15 04:23:15 -05:00
NCPlayz
dab2519a09 Implement TextChannel.follow() 2019-11-15 04:23:15 -05:00
apple502j
30c9e33384 [docs] category_id is Optional 2019-10-20 05:20:15 -04:00
Rapptz
5f272fa151 Add VoiceChannel.voice_states low level helper. 2019-07-10 04:51:27 -04:00
Rapptz
7e2da1c93b Publicly expose a type property for all channels.
Fix #2185
2019-06-09 00:23:22 -04:00
NCPlayz
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
Rapptz
2cd6d771ec Make __repr__ slightly more detailed and add a few missing ones.
This includes raw events (which didn't have any) and a few other
types that were missing them. Upon review some more useful fields were
added to the repr output which would be more useful during debugging.
2019-05-26 02:32:47 -04:00
Vexs
bf5b267c55 Correct the documentation for methods and properties that return Assets 2019-05-14 19:13:48 -04:00
DevilXD
b8e45afe9a Fixed TextChannel edit method missing slowmode unit 2019-04-29 23:34:17 -04:00
Rapptz
919dbcafb3 Consistent use of __all__ to prevent merge conflicts. 2019-04-20 17:20:58 -04:00
Rapptz
eb4de55f6d Add reason to TextChannel.create_webhook
The reason parameter does not work with webhook deletes or edits so
they're not added. Probably a Discord bug.
2019-04-18 22:31:55 -04:00
Rapptz
f5c38c3559 Add abc.GuildChannel.clone to clone a channel with another name.
Fixes #2093
2019-04-18 22:31:54 -04:00
Rapptz
812578f0c9 Remove legacy nsfw check. 2019-04-16 20:29:13 -04:00
Lorenzo
b969016340
Bool fix in TextChannel.purge documentation. 2019-04-13 15:27:20 +02:00
apple502j
024e57efc2
Change slowmode max value in docs 2019-04-13 18:56:53 +09:00
khazhyk
366dc4855b simplify HistoryIterator message ordering
rename reverse -> oldest_first, which is more obvious what it does.
Then, honor it entirely - if you specify no `after` endpoint, we default
to the beginning of message history, similar to how `before` defaults to
the end of message history.

This is a breaking change, and will change the behavior of any iterator
that previously would have been returning messages in a weird order for
limits over 100

`for msg in history(reversed=True, limit=300)` would return the newest
300 messages, in a messed up order (100..0, 200..100, 300..200).
`for msg in history(oldest_first=True, limit=300)` will now return the
oldest 300 messages in order. And so on.

`for msg in history(after=msg)` is unchanged, this previously would
return the oldest 100 messages after `msg`, oldest->newest order, and
still will.
2019-04-07 22:46:40 -07:00
NCPlayz
be227ebcf0 Redesign asset retrieval in the library.
Most assets now return a new class named `Asset`. This allows for the
assets to be consistently saved via a `save` method instead of special
casing for `Attachment`.

`AppInfo` is no longer a namedtuple it is a fully documented dataclass,
as well as having the state attached to it.

Fixes #1997
2019-04-06 19:12:50 -04:00
Capn
fd3a176793
Fix documentation for Channel.last_message 2019-03-22 10:31:19 -05:00
Rapptz
35c0476dbb Add TextChannel.last_message_id and TextChannel.last_message 2019-03-20 22:30:23 -04:00
NCPlayz
fb02191b80 Organise documentation 2019-03-19 08:24:42 -04:00
Rapptz
cb9ae7bd76 Sorting bucket requires an integer. 2019-03-17 15:16:46 -04:00
Rapptz
f3f2f882fd Fix typo in private property name. 2019-03-17 15:14:58 -04:00