@@ -1019,7 +1019,7 @@ class DiscordExtremeList(Service):
1019
1019
- `Discord Extreme List API Documentation <https://docs.discordextremelist.xyz/>`_
1020
1020
"""
1021
1021
1022
- BASE_URL = 'https://api.discordextremelist.xyz/v1 '
1022
+ BASE_URL = 'https://api.discordextremelist.xyz/v2 '
1023
1023
1024
1024
@staticmethod
1025
1025
def aliases () -> list :
@@ -1032,11 +1032,14 @@ def _post(
1032
1032
voice_connections = 0 , shard_count : int = None ,
1033
1033
shard_id : int = None
1034
1034
) -> HTTPResponse :
1035
+ payload = { 'guildCount' : server_count }
1036
+ if shard_id and shard_count :
1037
+ payload ['shardCount' ] = shard_count
1035
1038
return http_client .request (
1036
1039
method = 'POST' ,
1037
- path = f'{ DiscordExtremeList .BASE_URL } /bot/{ bot_id } ' ,
1040
+ path = f'{ DiscordExtremeList .BASE_URL } /bot/{ bot_id } /stats ' ,
1038
1041
headers = { 'Authorization' : token },
1039
- json = { 'guildCount' : server_count }
1042
+ json = payload
1040
1043
)
1041
1044
1042
1045
def get_statistics (self ) -> HTTPResponse :
@@ -1112,19 +1115,6 @@ def get_user(self, user_id: str) -> HTTPResponse:
1112
1115
requires_token = True
1113
1116
)
1114
1117
1115
- def get_widget_url (self , bot_id : str , ** query ) -> str :
1116
- """
1117
- Gets the widget URL for this bot.
1118
-
1119
- Parameters
1120
- -----------
1121
- bot_id: :class:`str`
1122
- The bot's ID.
1123
- **query
1124
- The query string to append to the URL.
1125
- """
1126
- return f'{ DiscordExtremeList .BASE_URL } /bot/{ bot_id } /widget?{ _encode_query (query )} '
1127
-
1128
1118
class GlennBotList (Service ):
1129
1119
"""
1130
1120
Represents the Glenn Bot List service.
0 commit comments