def fetch_user(self, id, raise_on_error=True): try: r = self.bot.client.api.http(Routes.USERS_GET, dict(user=id)) return DiscoUser.create(self.bot.client.api.client,r.json()) except APIException: if raise_on_error: raise CommandFail('unknown user') return
def users_me_patch(self, payload): r = self.http(Routes.USERS_ME_PATCH, json=payload) return User.create(self.client, r.json())
def users_me_get(self): return User.create(self.client, self.http(Routes.USERS_ME_GET).json())
def users_get(self, user): r = self.http(Routes.USERS_GET, dict(user=user)) return User.create(self.client, r.json())