Currently creating a new thread uses a default auto archive duration of
1440 minutes, or 1 day.
Rather than prescribing our own default, we can use the default auto
archive duration that is set on the channel. This ensures that newly
created threads will respect the default auto archive duration as
prescribed by the user.
This patch also does the following:
* Sets some parameters to be positional only
* Changes Guild.edit to use the MISSING sentinel
* Changes the various create_channel methods to be type safe
* Changes many parameters from Optional[T] to use MISSING
* Changes Guild.create_role to use MISSING sentinel
This refactor is mostly partial but lays a decent foundation
Instead of start_public_thread and start_private_thread they'll now be
one method.
I might revert this if starting a public thread without a message never
ends up happening.
This is a breaking change.
This does the following transformations, assuming `asset` represents
an asset type.
Object.is_asset_animated() => Object.asset.is_animated()
Object.asset => Object.asset.key
Object.asset_url => Object.asset_url
Object.asset_url_as => Object.asset.replace(...)
Since the asset type now requires a key (or hash, if you will),
Emoji had to be flattened similar to how Attachment was done since
these assets are keyed solely ID.
Emoji.url (Asset) => Emoji.url (str)
Emoji.url_as => removed
Emoji.url.read => Emoji.read
Emoji.url.save => Emoji.save
This transformation was also done to PartialEmoji.
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.