fix conflicts
This commit is contained in:
@@ -35,14 +35,12 @@ import re
|
||||
import aiohttp
|
||||
|
||||
from .user import User, Profile
|
||||
from .asset import Asset
|
||||
from .invite import Invite
|
||||
from .template import Template
|
||||
from .widget import Widget
|
||||
from .guild import Guild
|
||||
from .channel import _channel_factory
|
||||
from .enums import ChannelType
|
||||
from .member import Member
|
||||
from .mentions import AllowedMentions
|
||||
from .errors import *
|
||||
from .enums import Status, VoiceRegion
|
||||
@@ -347,6 +345,18 @@ class Client:
|
||||
ws = self.ws
|
||||
return float('nan') if not ws else ws.latency
|
||||
|
||||
def is_ws_ratelimited(self):
|
||||
""":class:`bool`: Whether the websocket is currently rate limited.
|
||||
|
||||
This can be useful to know when deciding whether you should query members
|
||||
using HTTP or via the gateway.
|
||||
|
||||
.. versionadded:: 1.6
|
||||
"""
|
||||
if self.ws:
|
||||
return self.ws.is_ratelimited()
|
||||
return False
|
||||
|
||||
@property
|
||||
def user(self):
|
||||
"""Optional[:class:`.ClientUser`]: Represents the connected client. ``None`` if not logged in."""
|
||||
|
||||
Reference in New Issue
Block a user