Skip to content

Commit

Permalink
Added datetime objects
Browse files Browse the repository at this point in the history
  • Loading branch information
NexInfinite committed Aug 7, 2020
1 parent a9a636f commit 0a7aca3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Hiven/Objects/message_update.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import datetime


class message_update_obj:
def __init__(self, ctx):
self.message = self.Message(ctx)
Expand All @@ -9,6 +12,7 @@ class Message:
def __init__(self, ctx):
self.content = ctx['content']
self.timestamp = ctx['timestamp']
self.time = datetime.datetime.fromtimestamp(float(ctx['timestamp']) / 1e3)
self.id = ctx['id']
self.mentions = ctx['mentions']

Expand Down
1 change: 1 addition & 0 deletions Hiven/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Should we make this async???


class Bot:
def __init__(self, token, debug=False, output=False):
self.restURL = "https://api.hiven.io/v1"
Expand Down

0 comments on commit 0a7aca3

Please sign in to comment.