aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-09-04 22:00:22 -0400
committerRapptz <[email protected]>2015-09-04 22:00:22 -0400
commitb4e6591c9dd41fd7f30a2be101561d6d8b65bd8a (patch)
treeb0cd46064c8e80311f9507d09fd1fffe16274d32 /discord/client.py
parentUse kwargs if the number of arguments needed is too many. (diff)
downloaddiscord.py-b4e6591c9dd41fd7f30a2be101561d6d8b65bd8a.tar.xz
discord.py-b4e6591c9dd41fd7f30a2be101561d6d8b65bd8a.zip
Refactor parse_time into its own utils file.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/discord/client.py b/discord/client.py
index 58e7e31b..098f16f7 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -24,18 +24,20 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
-import requests
-import json, re, time, copy
-from collections import deque
-from threading import Timer
-from ws4py.client.threadedclient import WebSocketClient
-from sys import platform as sys_platform
from . import endpoints
from .errors import InvalidEventName, InvalidDestination, GatewayNotFound
from .user import User
from .channel import Channel, PrivateChannel
from .server import Server, Member, Permissions, Role
from .message import Message
+from .utils import parse_time
+
+import requests
+import json, re, time, copy
+from collections import deque
+from threading import Timer
+from ws4py.client.threadedclient import WebSocketClient
+from sys import platform as sys_platform
def _null_event(*args, **kwargs):
pass
@@ -238,7 +240,7 @@ class Client(object):
continue
value = data[attr]
if 'time' in attr:
- setattr(message, attr, message._parse_time(value))
+ setattr(message, attr, parse_time(value))
else:
setattr(message, attr, value)
self._invoke_event('on_message_edit', older_message, message)