conflict fixes

This commit is contained in:
iDutchy
2021-04-07 18:27:34 -05:00
94 changed files with 4512 additions and 3018 deletions

View File

@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2020 Rapptz
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -30,6 +28,11 @@ from .colour import Colour
from .mixins import Hashable
from .utils import snowflake_time, _get_as_snowflake
__all__ = (
'RoleTags',
'Role',
)
class RoleTags:
"""Represents tags on a role.
@@ -191,7 +194,7 @@ class Role(Hashable):
def _update(self, data):
self.name = data['name']
self._permissions = data.get('permissions', 0)
self._permissions = int(data.get('permissions_new', 0))
self.position = data.get('position', 0)
self._colour = data.get('color', 0)
self.hoist = data.get('hoist', False)
@@ -251,7 +254,7 @@ class Role(Hashable):
@property
def mention(self):
""":class:`str`: Returns a string that allows you to mention a role."""
return '<@&%s>' % self.id
return f'<@&{self.id}>'
@property
def members(self):
@@ -343,7 +346,7 @@ class Role(Hashable):
payload = {
'name': fields.get('name', self.name),
'permissions': fields.get('permissions', self.permissions).value,
'permissions': str(fields.get('permissions', self.permissions).value),
'color': colour.value,
'hoist': fields.get('hoist', self.hoist),
'mentionable': fields.get('mentionable', self.mentionable)