|
@ -32,7 +32,7 @@ from collections import namedtuple |
|
|
|
|
|
|
|
|
from .iterators import HistoryIterator |
|
|
from .iterators import HistoryIterator |
|
|
from .context_managers import Typing |
|
|
from .context_managers import Typing |
|
|
from .errors import InvalidArgument, ClientException |
|
|
from .errors import InvalidArgument, ClientException, HTTPException |
|
|
from .permissions import PermissionOverwrite, Permissions |
|
|
from .permissions import PermissionOverwrite, Permissions |
|
|
from .role import Role |
|
|
from .role import Role |
|
|
from .invite import Invite |
|
|
from .invite import Invite |
|
@ -578,7 +578,7 @@ class GuildChannel: |
|
|
raise InvalidArgument('No overwrite provided.') |
|
|
raise InvalidArgument('No overwrite provided.') |
|
|
try: |
|
|
try: |
|
|
overwrite = PermissionOverwrite(**permissions) |
|
|
overwrite = PermissionOverwrite(**permissions) |
|
|
except: |
|
|
except (ValueError, TypeError): |
|
|
raise InvalidArgument('Invalid permissions given to keyword arguments.') |
|
|
raise InvalidArgument('Invalid permissions given to keyword arguments.') |
|
|
else: |
|
|
else: |
|
|
if len(permissions) > 0: |
|
|
if len(permissions) > 0: |
|
@ -778,7 +778,7 @@ class Messageable(metaclass=abc.ABCMeta): |
|
|
await asyncio.sleep(delete_after, loop=state.loop) |
|
|
await asyncio.sleep(delete_after, loop=state.loop) |
|
|
try: |
|
|
try: |
|
|
await ret.delete() |
|
|
await ret.delete() |
|
|
except: |
|
|
except HTTPException: |
|
|
pass |
|
|
pass |
|
|
asyncio.ensure_future(delete(), loop=state.loop) |
|
|
asyncio.ensure_future(delete(), loop=state.loop) |
|
|
return ret |
|
|
return ret |
|
@ -981,7 +981,7 @@ class Connectable(metaclass=abc.ABCMeta): |
|
|
except asyncio.TimeoutError as e: |
|
|
except asyncio.TimeoutError as e: |
|
|
try: |
|
|
try: |
|
|
await voice.disconnect(force=True) |
|
|
await voice.disconnect(force=True) |
|
|
except: |
|
|
except Exception: |
|
|
# we don't care if disconnect failed because connection failed |
|
|
# we don't care if disconnect failed because connection failed |
|
|
pass |
|
|
pass |
|
|
raise e # re-raise |
|
|
raise e # re-raise |
|
|