remove trailing whitespace
This commit is contained in:
parent
a3f700c11f
commit
7d345e8e4e
@ -1146,10 +1146,10 @@ class Connectable(metaclass=abc.ABCMeta):
|
||||
|
||||
client = state._get_client()
|
||||
voice = cls(client, self)
|
||||
|
||||
|
||||
if not isinstance(voice, VoiceProtocol):
|
||||
raise TypeError('Type must meet VoiceProtocol abstract base class.')
|
||||
|
||||
|
||||
state._add_voice_client(key_id, voice)
|
||||
|
||||
try:
|
||||
|
@ -56,7 +56,7 @@ class CallMessage:
|
||||
@property
|
||||
def call_ended(self):
|
||||
""":class:`bool`: Indicates if the call has ended.
|
||||
|
||||
|
||||
.. deprecated:: 1.7
|
||||
"""
|
||||
return self.ended_timestamp is not None
|
||||
@ -64,7 +64,7 @@ class CallMessage:
|
||||
@property
|
||||
def channel(self):
|
||||
r""":class:`GroupChannel`\: The private channel associated with this message.
|
||||
|
||||
|
||||
.. deprecated:: 1.7
|
||||
"""
|
||||
return self.message.channel
|
||||
@ -148,7 +148,7 @@ class GroupCall:
|
||||
@property
|
||||
def channel(self):
|
||||
r""":class:`GroupChannel`\: Returns the channel the group call is in.
|
||||
|
||||
|
||||
.. deprecated:: 1.7
|
||||
"""
|
||||
return self.call.channel
|
||||
|
@ -680,8 +680,8 @@ class HTTPClient:
|
||||
return self.request(Route('PUT', '/guilds/{guild_id}/templates/{code}', guild_id=guild_id, code=code))
|
||||
|
||||
def edit_template(self, guild_id, code, payload):
|
||||
valid_keys = (
|
||||
'name',
|
||||
valid_keys = (
|
||||
'name',
|
||||
'description',
|
||||
)
|
||||
payload = {
|
||||
|
@ -415,7 +415,7 @@ class Message(Hashable):
|
||||
call: Optional[:class:`CallMessage`]
|
||||
The call that the message refers to. This is only applicable to messages of type
|
||||
:attr:`MessageType.call`.
|
||||
|
||||
|
||||
.. deprecated:: 1.7
|
||||
|
||||
reference: Optional[:class:`~discord.MessageReference`]
|
||||
@ -923,7 +923,7 @@ class Message(Hashable):
|
||||
|
||||
if self.type is MessageType.channel_follow_add:
|
||||
return '{0.author.name} has added {0.content} to this channel'.format(self)
|
||||
|
||||
|
||||
if self.type is MessageType.guild_stream:
|
||||
return '{0.author.name} is live! Now streaming {0.author.activity.name}'.format(self)
|
||||
|
||||
|
@ -159,7 +159,7 @@ class Permissions(BaseFlags):
|
||||
- :attr:`kick_members`
|
||||
- :attr:`ban_members`
|
||||
- :attr:`administrator`
|
||||
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_slash_commands` permissions.
|
||||
"""
|
||||
@ -169,7 +169,7 @@ class Permissions(BaseFlags):
|
||||
def general(cls):
|
||||
"""A factory method that creates a :class:`Permissions` with all
|
||||
"General" permissions from the official Discord UI set to ``True``.
|
||||
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
Permission :attr:`read_messages` is now included in the general permissions, but
|
||||
permissions :attr:`administrator`, :attr:`create_instant_invite`, :attr:`kick_members`,
|
||||
@ -182,7 +182,7 @@ class Permissions(BaseFlags):
|
||||
def membership(cls):
|
||||
"""A factory method that creates a :class:`Permissions` with all
|
||||
"Membership" permissions from the official Discord UI set to ``True``.
|
||||
|
||||
|
||||
.. versionadded:: 1.7
|
||||
"""
|
||||
return cls(0b00001100000000000000000000000111)
|
||||
@ -191,7 +191,7 @@ class Permissions(BaseFlags):
|
||||
def text(cls):
|
||||
"""A factory method that creates a :class:`Permissions` with all
|
||||
"Text" permissions from the official Discord UI set to ``True``.
|
||||
|
||||
|
||||
.. versionchanged:: 1.7
|
||||
Permission :attr:`read_messages` is no longer part of the text permissions.
|
||||
Added :attr:`use_slash_commands` permission.
|
||||
@ -208,7 +208,7 @@ class Permissions(BaseFlags):
|
||||
def advanced(cls):
|
||||
"""A factory method that creates a :class:`Permissions` with all
|
||||
"Advanced" permissions from the official Discord UI set to ``True``.
|
||||
|
||||
|
||||
.. versionadded:: 1.7
|
||||
"""
|
||||
return cls(1 << 3)
|
||||
|
@ -106,7 +106,7 @@ class Template:
|
||||
def __init__(self, *, state, data):
|
||||
self._state = state
|
||||
self._store(data)
|
||||
|
||||
|
||||
def _store(self, data):
|
||||
self.code = data['code']
|
||||
self.uses = data['usage_count']
|
||||
@ -173,10 +173,10 @@ class Template:
|
||||
|
||||
data = await self._state.http.create_from_template(self.code, name, region_value, icon)
|
||||
return Guild(data=data, state=self._state)
|
||||
|
||||
|
||||
async def sync(self):
|
||||
"""|coro|
|
||||
|
||||
|
||||
Sync the template to the guild's current state.
|
||||
|
||||
You must have the :attr:`~Permissions.manage_guild` permission in the
|
||||
@ -199,14 +199,14 @@ class Template:
|
||||
|
||||
async def edit(self, **kwargs):
|
||||
"""|coro|
|
||||
|
||||
|
||||
Edit the template metadata.
|
||||
|
||||
|
||||
You must have the :attr:`~Permissions.manage_guild` permission in the
|
||||
source guild to do this.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
|
||||
Parameters
|
||||
------------
|
||||
name: Optional[:class:`str`]
|
||||
@ -225,12 +225,12 @@ class Template:
|
||||
"""
|
||||
data = await self._state.http.edit_template(self.source_guild.id, self.code, kwargs)
|
||||
self._store(data)
|
||||
|
||||
|
||||
async def delete(self):
|
||||
"""|coro|
|
||||
|
||||
|
||||
Delete the template.
|
||||
|
||||
|
||||
You must have the :attr:`~Permissions.manage_guild` permission in the
|
||||
source guild to do this.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user