split setPhone into 2 functions
setPhone and validatePhone
@@ -176,16 +176,17 @@ class User(object):
url = self.discord+"users/@me/delete"
body = {"password": password}
return Wrapper.sendRequest(self.s, 'post', url, body, log=self.log)
- def setphone(self, number):
+
+ def setPhone(self, number):
url = self.discord+"users/@me/phone"
body = {"phone": number}
- Wrapper.sendRequest(self.s, 'post', url, body, log=self.log)
- class validation:
- def validate(code: int):
+ return Wrapper.sendRequest(self.s, 'post', url, body, log=self.log)
+
+ def validatePhone(self, number, code):
url = self.discord+"phone-verifications/verify"
- body = {"phone": number,"code": code}
+ body = {"phone": number,"code": str(code)}
return Wrapper.sendRequest(self.s, 'post', url, body, log=self.log)
- return validation
+
'''
Privacy & Safety
'''
