Skip to content

Commit 90bc426

Browse files
committed
feat(TopCord): update API URL, add get_bots
1 parent ed8e103 commit 90bc426

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dbots/service.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ class TopCord(Service):
12011201
- `TopCord API Documentation <https://docs.topcord.xyz/#/API>`_
12021202
"""
12031203

1204-
BASE_URL = 'https://topcord.xyz/api'
1204+
BASE_URL = 'https://api.topcord.xyz'
12051205

12061206
@staticmethod
12071207
def aliases() -> list:
@@ -1219,7 +1219,7 @@ def _post(
12191219
payload['shards'] = shard_count
12201220
return http_client.request(
12211221
method='POST',
1222-
path=f'{TopCord.BASE_URL}/bot/stats/{bot_id}',
1222+
path=f'{TopCord.BASE_URL}/bot/{bot_id}/stats',
12231223
headers={'Authorization': token},
12241224
json=payload
12251225
)
@@ -1238,6 +1238,13 @@ def get_bot(self, bot_id: str) -> HTTPResponse:
12381238
path=f'/bot/{bot_id}',
12391239
)
12401240

1241+
def get_bots(self) -> HTTPResponse:
1242+
"""|httpres|\n\nLists every bot on this service."""
1243+
return self._request(
1244+
method='GET',
1245+
path='/bots',
1246+
)
1247+
12411248

12421249
class TopGG(Service):
12431250
"""

0 commit comments

Comments
 (0)