Esempio n. 1
0
 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
Esempio n. 2
0
 def users_me_patch(self, payload):
     r = self.http(Routes.USERS_ME_PATCH, json=payload)
     return User.create(self.client, r.json())
Esempio n. 3
0
 def users_me_get(self):
     return User.create(self.client, self.http(Routes.USERS_ME_GET).json())
Esempio n. 4
0
File: client.py Progetto: zw5/disco
 def users_get(self, user):
     r = self.http(Routes.USERS_GET, dict(user=user))
     return User.create(self.client, r.json())