EGAM


NameEGAM JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/taka-4602/Discord-Easy-Guild-Add-Member
SummaryA simple API wrapper for Discord Guild Add Member
upload_time2024-01-27 06:05:32
maintainer
docs_urlNone
authortaka4602
requires_python>=3.6
license
keywords discord add member
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Discord-Easy-Guild-Add-Member
A simple API wrapper for Discord Guild Add Member  
For Member-Boost Bot, Member-Backup Bot ( Yes, it's same as RestoreCord )  
### >> ```pip install EGAM``` <<
### 日本語はこちら -> [README-JA](https://github.com/taka-4602/Discord-Easy-Guild-Add-Member/blob/main/README-JA.md)
## Try using it ! ( It's too simple, But it's does any good jobs ! )
#### use.py
```python
from EGAM import EGAM

token="Discord Bot Token"
cid="Client ID"
cse="Client Secret"
ruri="Redirect URI"

egam=EGAM(bot_token=token,client_id=cid,client_secret=cse,redirect_uri=ruri,proxy=None)#you can set any proxy (proxy=dict)

print(egam.get_token("code"))#get any tokens
print(egam.get_user("access_token"))#get user infomation (like user id / user name)
print(egam.add_role(user_id="1234567890",guild_id="1234567890",role_id="1234567890"))#add role to user
print(egam.add_member(access_token="access_token",user_id="1234567890",guild_id="1234567890"))#add user to guild
print(egam.refresh("refresh_token"))#refresh OAuth2 AccessToken
```
I wrote how to use it in the #comments, And it's all  
Incorporate this code into your Member-Backup Bot!   
### Know a little more
```EGAM.get_token```  
- A dict is returned regardless of success or failure  
  You can see the token, access token, and expiration date  

```EGAM.get_user```
- It's return a dict, and you can find out a lot of user information with this  
  ```
  {'id': '614025927877197834', 'username': '.taka.', 'avatar': '8057538b821aad2e5995cdaf5d94c173', 'discriminator': '0', 'public_flags': 4194560, 'premium_type': 2, 'flags': 4194560, 'banner': '05f76c61f15f5c073ef53c14c2528ff8', 'accent_color': 65573,
  'global_name': 'たか', 'avatar_decoration_data': {'asset': 'a_d3da36040163ee0f9176dfe7ced45cdc', 'sku_id': '1144058522808614923'}, 'banner_color': '#010025', 'mfa_enabled': False, 'locale': 'en-US'}
  ```
  
```EGAM.add_role```
- HTTP response status codes is returned as an int  
  ```204``` is success, other is failing

```EGAM.add_member```
- HTTP response status codes is returned as an int, same as add_role  
  ```201``` / Success  
  ```204``` / User is already on that server   
  ```403``` / Access token is invalid  
  ```400``` / User's server limit

```EGAM.refresh```
- Returns dict on success, status code in int on failure  
  ```400``` / User was deauthorized your app  
### Example Bot is here -> [Discord-Backup-Bot](https://github.com/taka-4602/Discord-Backup-Bot)
#### ( Sorry for not using English )

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/taka-4602/Discord-Easy-Guild-Add-Member",
    "name": "EGAM",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "discord,add member",
    "author": "taka4602",
    "author_email": "shun4602@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4a/8d/f90933234d855550f9bbcbe38bdf8e92dc914d33b474caa295e12c94b581/EGAM-1.0.1.tar.gz",
    "platform": null,
    "description": "# Discord-Easy-Guild-Add-Member\r\nA simple API wrapper for Discord Guild Add Member  \r\nFor Member-Boost Bot, Member-Backup Bot ( Yes, it's same as RestoreCord )  \r\n### >> ```pip install EGAM``` <<\r\n### \u65e5\u672c\u8a9e\u306f\u3053\u3061\u3089 -> [README-JA](https://github.com/taka-4602/Discord-Easy-Guild-Add-Member/blob/main/README-JA.md)\r\n## Try using it ! ( It's too simple, But it's does any good jobs ! )\r\n#### use.py\r\n```python\r\nfrom EGAM import EGAM\r\n\r\ntoken=\"Discord Bot Token\"\r\ncid=\"Client ID\"\r\ncse=\"Client Secret\"\r\nruri=\"Redirect URI\"\r\n\r\negam=EGAM(bot_token=token,client_id=cid,client_secret=cse,redirect_uri=ruri,proxy=None)#you can set any proxy (proxy=dict)\r\n\r\nprint(egam.get_token(\"code\"))#get any tokens\r\nprint(egam.get_user(\"access_token\"))#get user infomation (like user id / user name)\r\nprint(egam.add_role(user_id=\"1234567890\",guild_id=\"1234567890\",role_id=\"1234567890\"))#add role to user\r\nprint(egam.add_member(access_token=\"access_token\",user_id=\"1234567890\",guild_id=\"1234567890\"))#add user to guild\r\nprint(egam.refresh(\"refresh_token\"))#refresh OAuth2 AccessToken\r\n```\r\nI wrote how to use it in the #comments, And it's all  \r\nIncorporate this code into your Member-Backup Bot!   \r\n### Know a little more\r\n```EGAM.get_token```  \r\n- A dict is returned regardless of success or failure  \r\n  You can see the token, access token, and expiration date  \r\n\r\n```EGAM.get_user```\r\n- It's return a dict, and you can find out a lot of user information with this  \r\n  ```\r\n  {'id': '614025927877197834', 'username': '.taka.', 'avatar': '8057538b821aad2e5995cdaf5d94c173', 'discriminator': '0', 'public_flags': 4194560, 'premium_type': 2, 'flags': 4194560, 'banner': '05f76c61f15f5c073ef53c14c2528ff8', 'accent_color': 65573,\r\n  'global_name': '\u305f\u304b', 'avatar_decoration_data': {'asset': 'a_d3da36040163ee0f9176dfe7ced45cdc', 'sku_id': '1144058522808614923'}, 'banner_color': '#010025', 'mfa_enabled': False, 'locale': 'en-US'}\r\n  ```\r\n  \r\n```EGAM.add_role```\r\n- HTTP response status codes is returned as an int  \r\n  ```204``` is success, other is failing\r\n\r\n```EGAM.add_member```\r\n- HTTP response status codes is returned as an int, same as add_role  \r\n  ```201``` / Success  \r\n  ```204``` / User is already on that server   \r\n  ```403``` / Access token is invalid  \r\n  ```400``` / User's server limit\r\n\r\n```EGAM.refresh```\r\n- Returns dict on success, status code in int on failure  \r\n  ```400``` / User was deauthorized your app  \r\n### Example Bot is here -> [Discord-Backup-Bot](https://github.com/taka-4602/Discord-Backup-Bot)\r\n#### ( Sorry for not using English )\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A simple API wrapper for Discord Guild Add Member",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/taka-4602/Discord-Easy-Guild-Add-Member"
    },
    "split_keywords": [
        "discord",
        "add member"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a8df90933234d855550f9bbcbe38bdf8e92dc914d33b474caa295e12c94b581",
                "md5": "2560296ad2c676c825bf4c6df11c0d8b",
                "sha256": "1e9726b4428f551a54d100495df2157886d0d4c3712d520eb8de81302f33fe9d"
            },
            "downloads": -1,
            "filename": "EGAM-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2560296ad2c676c825bf4c6df11c0d8b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3326,
            "upload_time": "2024-01-27T06:05:32",
            "upload_time_iso_8601": "2024-01-27T06:05:32.077182Z",
            "url": "https://files.pythonhosted.org/packages/4a/8d/f90933234d855550f9bbcbe38bdf8e92dc914d33b474caa295e12c94b581/EGAM-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-27 06:05:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "taka-4602",
    "github_project": "Discord-Easy-Guild-Add-Member",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "egam"
}
        
Elapsed time: 0.47409s