From bf470fc1dc2006ec573087690bbc39f69bf5705b Mon Sep 17 00:00:00 2001 From: Milked/Milkey_Hack <70030251+yutodadil@users.noreply.github.com> Date: Thu, 15 Jun 2023 23:13:39 +0900 Subject: [PATCH 1/2] create a pronoun and globalname function --- discum/user/user.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/discum/user/user.py b/discum/user/user.py index 20c483a..9c43b27 100644 --- a/discum/user/user.py +++ b/discum/user/user.py @@ -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) From 3271aaefb559564cf8184efc7c5388d2c57cf08f Mon Sep 17 00:00:00 2001 From: Milked/Milkey_Hack <70030251+yutodadil@users.noreply.github.com> Date: Thu, 15 Jun 2023 23:19:34 +0900 Subject: [PATCH 2/2] Update docs --- docs/using/REST_Actions.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/using/REST_Actions.md b/docs/using/REST_Actions.md index 386008e..b95168f 100644 --- a/docs/using/REST_Actions.md +++ b/docs/using/REST_Actions.md @@ -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()