Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new function #472

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions discum/user/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ def setUserNote(self, userID, note):
body = {"note": note}
return Wrapper.sendRequest(self.s, 'put', url, body, log=self.log)

def globalname(self, name): #for change a Globalname
url = self.discord+"users/@me"
body = {"global_name": name}
return Wrapper.sendRequest(self.s, 'patch', url, body, log=self.log)

def pronoun(self, pronoun): #for change a pronouns
url = self.discord+"users/@me"
body = {"pronouns": pronoun}
return Wrapper.sendRequest(self.s, 'patch', url, body, log=self.log)

def getRTCregions(self):
url = "https://latency.discord.media/rtc"
return Wrapper.sendRequest(self.s, 'get', url, log=self.log)
Expand Down
14 changes: 14 additions & 0 deletions docs/using/REST_Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,20 @@ bot.setUserNote('userID0000000000', 'hello')
- userID (str)
- note (str)

##### ```Change Global Name```
```python
bot.globalname('hello iam selfbot')
```
###### Parameters:
- name (str)

##### ```Change Pronoun```
```python
bot.pronoun('selfbot/bot')
```
###### Parameters:
- pronoun (str)

##### ```getRTCregions```
```python
bot.getRTCregions()
Expand Down