Skip to content

Commit 8a4429a

Browse files
authored
Updated readme for new features
Added multiple new request functions
1 parent 28b59b9 commit 8a4429a

File tree

1 file changed

+86
-1
lines changed

1 file changed

+86
-1
lines changed

README.md

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ request functions return dictionary responses and can be used with asyncio's `aw
8181
#
8282
#
8383
`bot.request_server_by_id(server_id)`
84-
> Used for gathering info about a server.
84+
> Used for gathering info about a server via server ID.
8585
```
8686
Parameters:
8787
•server_id - the ID number of your server. Int or String object.
@@ -90,6 +90,27 @@ request functions return dictionary responses and can be used with asyncio's `aw
9090
```
9191
#
9292
#
93+
`bot.request_server_by_name(server_name)`
94+
> Used for gathering info about a server via server name. - Note: This one returns a list of dictionaries, as multiple servers can have the same name!
95+
```
96+
Parameters:
97+
•server_name - the name of your server. String object.
98+
Example return:
99+
[{'id': 345654377, 'name': 'jimmys server', 'online_players': [], 'server_status': 'Online', 'final_status': 'Offline', 'scene_index': 0, 'target': 1, 'region': 'north-america-agones', 'last_online': '2022-05-15T14:55:54.0527322Z', 'description': 'A server for jimmy and their friends', 'playability': 0.0, 'version': 'main-0.1.2.4', 'group_id': 3454635756, 'owner_type': 'Group', 'owner_id': 255434345, 'type': 'Normal', 'fleet': 'att-release', 'up_time': '00:46:31.9191574'}]
100+
```
101+
#
102+
#
103+
`bot.request_group_by_id(group_id)`
104+
> Used to get info about a group via it's ID
105+
```
106+
Parameters:
107+
•group_id - the ID number of your group. Int or String object.
108+
Example return:
109+
[{'id': 34564575, 'name': 'jimmys server', 'online_players': [], 'server_status': 'Online', 'final_status': 'Offline', 'scene_index': 0, 'target': 1, 'region': 'north-america-agones', 'last_online': '2022-05-15T14:55:54.0527322Z', 'description': 'A server for jimmy and their friends', 'playability': 0.0, 'version': 'main-0.1.2.4', 'group_id': 2346436756, 'owner_type': 'Group', 'owner_id': 86453456, 'type': 'Normal', 'fleet': 'att-release', 'up_time': '00:46:31.9191574'}]
110+
111+
```
112+
#
113+
#
93114
`bot.request_current_groups()`
94115
> Used for getting all groups you're currently a member of. - Note: This one returns a list of dictionaries!
95116
```
@@ -140,6 +161,50 @@ request functions return dictionary responses and can be used with asyncio's `aw
140161
```
141162
#
142163
#
164+
`bot.request_pending_requests(group_id)`
165+
> Used to get all the pending invite requests to a server (A request from a user to join a server) - Note: This does not return outgoing invites from the server to a user. Only incoming requests to join.
166+
```
167+
Parameters:
168+
•group_id - the ID number of your group. Int or String object.
169+
Example return:
170+
[{'group_id': 798043507, 'user_id': 24434354, 'username': 'jimmythetrain', 'bot': False, 'icon': 0, 'permissions': 'Member', 'role_id': 1, 'created_at': '2022-05-15T19:36:30.82Z', 'type': 'RequestedJoin'}]
171+
172+
```
173+
#
174+
#
175+
`bot.request_member_info(group_id, player_id)`
176+
> Used to get info about a member from a group.
177+
```
178+
Parameters:
179+
•group_id - the ID number of your group. Int or String object.
180+
•player_id - the ID number of the player to get info about. Int or String object
181+
Example return:
182+
{'group_id': 54456434, 'user_id': 357346778, 'username': 'jimmythetrain', 'bot': False, 'icon': 0, 'permissions': 'Member, Moderator, Admin', 'role_id': 7, 'created_at': '2021-06-14T23:48:30.393Z', 'type': 'Accepted'}
183+
```
184+
#
185+
#
186+
`bot.request_check_pending_invites(group_id)`
187+
> Used to get all outgoing invites from the server to users. - Note: This does not return incoming requests to join the server from a user. Returns a list of dictionaries
188+
```
189+
Parameters:
190+
•group_id - the ID number of your group. Int or String object.
191+
Example return:
192+
[{'group_id': 2087854345, 'user_id': 200814839, 'username': 'Caterina', 'bot': False, 'icon': 0, 'permissions': 'Member', 'role_id': 1, 'created_at': '2022-05-15T19:40:40.739Z', 'type': 'Invited'}]
193+
```
194+
#
195+
#
196+
`bot.request_check_user_role(group_id, player_id, role_int)`
197+
> Used to check whether or not a user has the specified role. - Note: Will also return true if the player has a higher than specified role.
198+
```
199+
Parameters:
200+
•group_id - the ID number of your group. Int or String object.
201+
•player_id - the ID number of the player you want to check. Int or String object.
202+
•role_int - the ID number of the role you want to check if they have. Int or String object - Note: 1 is member, 2 is moderator and 7 is owner.
203+
Example return:
204+
{'value': True}
205+
```
206+
#
207+
#
143208
`bot.request_members(group_id)`
144209
> Used to get members of a server - Note: This one returns a list of dictionaries!
145210
```
@@ -174,6 +239,26 @@ request functions return dictionary responses and can be used with asyncio's `aw
174239
Example return:
175240
{'id': 98327498, 'username': 'jimmythetrain'}
176241
```
242+
#
243+
#
244+
`bot.request_search_userid(player_id)`
245+
> Used to resolve the username of an Alta account from an ID. Note: User account required!
246+
```
247+
Parameters:
248+
•player_id - The ID to lookup. Int or String object.
249+
Example return:
250+
{'id': 98327498, 'username': 'jimmythetrain'}
251+
```
252+
#
253+
#
254+
`bot.request_group_bans(group_id)`
255+
> Used to list the banned members of the group.
256+
```
257+
Parameters:
258+
•group_id - the ID number of your group. Int or String object.
259+
Example return:
260+
[{'group_id': 657354353, 'user_id': 4576854534, 'username': 'jerkfacemgee', 'bot': False, 'icon': 0, 'permissions': 0, 'role_id': 0, 'created_at': '2022-05-15T19:51:06.202Z', 'type': 'Banned'}]
261+
```
177262
# Other functions
178263

179264
These functions can be called using asyncio's `await`

0 commit comments

Comments
 (0)