@@ -118,8 +118,7 @@ def aliases() -> list:
118
118
def _post (
119
119
http_client : HTTPClient , bot_id : str , token : str ,
120
120
server_count = 0 , user_count = 0 ,
121
- voice_connections = 0 , shard_count : int = None ,
122
- shard_id : int = None
121
+ shard_count : int = None , shard_id : int = None
123
122
) -> HTTPResponse :
124
123
payload = {
125
124
'server_count' : server_count ,
@@ -358,6 +357,74 @@ def get_widget_url(self, bot_id: str, **query) -> str:
358
357
"""
359
358
return f'{ BotsForDiscord .BASE_URL } /bot/{ bot_id } /widget?{ _encode_query (query )} '
360
359
360
+ class BotsOfDiscord (Service ):
361
+ """
362
+ Represents the Bots Of Discord service.
363
+
364
+ .. seealso::
365
+ - `Bots Of Discord Website <https://b-o-d.cf/>`_
366
+ """
367
+
368
+ BASE_URL = 'https://www.b-o-d.cf/api'
369
+
370
+ @staticmethod
371
+ def aliases () -> list :
372
+ return ['botsofdiscord' , 'b-o-d' , 'b-o-d.cf' ]
373
+
374
+ @staticmethod
375
+ def _post (
376
+ http_client : HTTPClient , bot_id : str , token : str ,
377
+ server_count = 0 , shard_count : int = None ,
378
+ shard_id : int = None
379
+ ) -> HTTPResponse :
380
+ payload = { 'server_count' : server_count }
381
+ if shard_id and shard_count :
382
+ payload ['shard_count' ] = shard_count
383
+ return http_client .request (
384
+ method = 'POST' ,
385
+ path = f'{ BotsOfDiscord .BASE_URL } /bots/stats' ,
386
+ headers = { 'Authorization' : token },
387
+ json = payload
388
+ )
389
+
390
+ def get_bot (self , bot_id : str ) -> HTTPResponse :
391
+ """|httpres|\n
392
+ Gets the bot's stats on this service.
393
+
394
+ Parameters
395
+ -----------
396
+ bot_id: :class:`str`
397
+ The bot's ID.
398
+ """
399
+ return self ._request (
400
+ method = 'GET' ,
401
+ path = f'/bot/{ bot_id } /stats'
402
+ )
403
+
404
+ def get_bot_votes (self ) -> HTTPResponse :
405
+ """|httpres|\n
406
+ Gets the list of people who voted this bot on this service.
407
+ """
408
+ return self ._request (
409
+ method = 'GET' ,
410
+ path = f'/bot/votes' ,
411
+ requires_token = True
412
+ )
413
+
414
+ def get_user (self , user_id : str ) -> HTTPResponse :
415
+ """|httpres|\n
416
+ Gets the user listed on this service.
417
+
418
+ Parameters
419
+ -----------
420
+ user_id: :class:`str`
421
+ The user's ID.
422
+ """
423
+ return self ._request (
424
+ method = 'GET' ,
425
+ path = f'/users/{ user_id } '
426
+ )
427
+
361
428
class DiscordBotsGG (Service ):
362
429
"""
363
430
Represents the Discord Bots service.
0 commit comments