diff --git a/discord/channel.py b/discord/channel.py index 6478c47be..058f1d394 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -23,18 +23,14 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from .permissions import Permissions, PermissionOverwrite +from .permissions import Permissions from .enums import ChannelType, try_enum from .mixins import Hashable -from .role import Role -from .user import User -from .member import Member from . import utils from .errors import ClientException, NoMoreItems import discord.abc -import copy import time import asyncio diff --git a/discord/client.py b/discord/client.py index fc03400bf..78da75d0f 100644 --- a/discord/client.py +++ b/discord/client.py @@ -28,11 +28,9 @@ from .user import User, Profile from .invite import Invite from .object import Object from .errors import * -from .permissions import Permissions, PermissionOverwrite -from .enums import ChannelType, Status +from .enums import Status from .gateway import * from .voice_client import VoiceClient -from .emoji import Emoji from .http import HTTPClient from .state import ConnectionState from . import utils, compat @@ -43,12 +41,9 @@ import aiohttp import websockets import logging, traceback -import sys, re, io -import itertools -import datetime +import sys, re import signal from collections import namedtuple -from os.path import split as path_split PY35 = sys.version_info >= (3, 5) log = logging.getLogger(__name__) diff --git a/discord/gateway.py b/discord/gateway.py index f8e500617..34a9eaf1a 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -28,14 +28,12 @@ import sys import time import websockets import asyncio -import aiohttp from . import utils, compat -from .enums import Status, try_enum from .game import Game -from .errors import GatewayNotFound, ConnectionClosed, InvalidArgument +from .errors import ConnectionClosed, InvalidArgument import logging -import zlib, time, json +import zlib, json from collections import namedtuple import threading import struct diff --git a/discord/iterators.py b/discord/iterators.py index c8a3bdc0c..c3ac56432 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -26,7 +26,6 @@ DEALINGS IN THE SOFTWARE. import sys import asyncio -import aiohttp import datetime from .errors import NoMoreItems diff --git a/discord/member.py b/discord/member.py index d830462e5..8710269bd 100644 --- a/discord/member.py +++ b/discord/member.py @@ -34,7 +34,7 @@ from . import utils from .user import BaseUser, User from .game import Game from .permissions import Permissions -from .enums import Status, ChannelType, try_enum +from .enums import Status, try_enum from .colour import Colour class VoiceState: diff --git a/discord/message.py b/discord/message.py index 00e017f8e..95519996a 100644 --- a/discord/message.py +++ b/discord/message.py @@ -27,13 +27,9 @@ DEALINGS IN THE SOFTWARE. import asyncio import re -import discord.abc - from . import utils -from .user import User from .reaction import Reaction from .emoji import Emoji -from .object import Object from .calls import CallMessage from .enums import MessageType, try_enum from .errors import InvalidArgument, ClientException @@ -62,11 +58,8 @@ class Message: embeds: List[:class:`Embed`] A list embeds the message has. channel - The :class:`Channel` that the message was sent from. - Could be a :class:`PrivateChannel` if it's a private message. - In :issue:`very rare cases <21>` this could be a :class:`Object` instead. - - For the sake of convenience, this :class:`Object` instance has an attribute ``is_private`` set to ``True``. + The :class:`TextChannel` that the message was sent from. + Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message. call: Optional[:class:`CallMessage`] The call that the message refers to. This is only applicable to messages of type :attr:`MessageType.call`. diff --git a/discord/reaction.py b/discord/reaction.py index 1454ca8e6..d4a7bcdff 100644 --- a/discord/reaction.py +++ b/discord/reaction.py @@ -24,8 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import asyncio - from .iterators import ReactionIterator class Reaction: diff --git a/discord/shard.py b/discord/shard.py index 7937e375e..ebb28abec 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE. from .state import AutoShardedConnectionState from .client import Client from .gateway import * -from .errors import ConnectionClosed, ClientException, InvalidArgument +from .errors import ClientException, InvalidArgument from . import compat from .enums import Status diff --git a/discord/utils.py b/discord/utils.py index 2c5ddc901..2f9f61f92 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. """ from re import split as re_split -from .errors import HTTPException, Forbidden, NotFound, InvalidArgument +from .errors import InvalidArgument import datetime from base64 import b64encode import asyncio