Move message creation to a factory method inside ConnectionState.

This commit is contained in:
Rapptz
2017-01-03 08:41:44 -05:00
parent 5e6bfecb07
commit 98b981848d
14 changed files with 94 additions and 104 deletions

View File

@ -23,7 +23,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
import discord.utils
from . import utils
class Object:
"""Represents a generic Discord object.
@ -51,4 +51,4 @@ class Object:
@property
def created_at(self):
"""Returns the snowflake's creation time in UTC."""
return discord.utils.snowflake_time(self.id)
return utils.snowflake_time(self.id)