Skip to content

Commit

Permalink
remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
NCPlayz authored Mar 13, 2021
1 parent a3f700c commit 7d345e8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,10 +1146,10 @@ async def connect(self, *, timeout=60.0, reconnect=True, cls=VoiceClient):

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:
Expand Down
6 changes: 3 additions & 3 deletions discord/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ def __init__(self, message, **kwargs):
@property
def call_ended(self):
""":class:`bool`: Indicates if the call has ended.
.. deprecated:: 1.7
"""
return self.ended_timestamp is not None

@property
def channel(self):
r""":class:`GroupChannel`\: The private channel associated with this message.
.. deprecated:: 1.7
"""
return self.message.channel
Expand Down Expand Up @@ -148,7 +148,7 @@ def connected(self):
@property
def channel(self):
r""":class:`GroupChannel`\: Returns the channel the group call is in.
.. deprecated:: 1.7
"""
return self.call.channel
Expand Down
4 changes: 2 additions & 2 deletions discord/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ def sync_template(self, guild_id, code):
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 = {
Expand Down
4 changes: 2 additions & 2 deletions discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`]
Expand Down Expand Up @@ -923,7 +923,7 @@ def system_content(self):

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)

Expand Down
10 changes: 5 additions & 5 deletions discord/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def all_channel(cls):
- :attr:`kick_members`
- :attr:`ban_members`
- :attr:`administrator`
.. versionchanged:: 1.7
Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_slash_commands` permissions.
"""
Expand All @@ -169,7 +169,7 @@ def all_channel(cls):
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`,
Expand All @@ -182,7 +182,7 @@ def general(cls):
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)
Expand All @@ -191,7 +191,7 @@ def membership(cls):
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.
Expand All @@ -208,7 +208,7 @@ def voice(cls):
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)
Expand Down
18 changes: 9 additions & 9 deletions discord/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -173,10 +173,10 @@ async def create_guild(self, name, region=None, icon=None):

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
Expand All @@ -199,14 +199,14 @@ async def sync(self):

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`]
Expand All @@ -225,12 +225,12 @@ async def edit(self, **kwargs):
"""
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.
Expand Down

0 comments on commit 7d345e8

Please sign in to comment.