@@ -96,6 +96,44 @@ def __repr__(self):
96
96
97
97
###############################
98
98
99
+ class Arcane (Service ):
100
+ """
101
+ Represents the Arcane Bot Center service.
102
+
103
+ .. seealso::
104
+ - `Arcane Bot Center Website <https://arcane-center.xyz/>`_
105
+ - `Arcane Bot Center API Documentation <https://arcane-center.xyz/documentation>`_
106
+ """
107
+
108
+ BASE_URL = 'https://arcane-center.xyz/api'
109
+
110
+ @staticmethod
111
+ def aliases () -> list :
112
+ return [
113
+ 'arcanebotcenter' , 'arcanecenter' , 'arcane-botcenter.xyz' , 'arcanebotcenter.xyz' ,
114
+ 'arcane-center.xyz' , 'arcanecenter.xyz' , 'arcane' , 'abc'
115
+ ]
116
+
117
+ @staticmethod
118
+ def _post (
119
+ http_client : HTTPClient , bot_id : str , token : str ,
120
+ server_count = 0 , user_count = 0 ,
121
+ voice_connections = 0 , shard_count : int = None ,
122
+ shard_id : int = None
123
+ ) -> HTTPResponse :
124
+ payload = {
125
+ 'server_count' : server_count ,
126
+ 'member_count' : user_count ,
127
+ }
128
+ if shard_id and shard_count :
129
+ payload ['shard_count' ] = shard_count
130
+ return http_client .request (
131
+ method = 'POST' ,
132
+ path = f'{ Arcane .BASE_URL } /{ bot_id } /stats' ,
133
+ headers = { 'Authorization' : token },
134
+ json = payload
135
+ )
136
+
99
137
class BotListSpace (Service ):
100
138
"""
101
139
Represents the botlist.space service.
@@ -531,5 +569,5 @@ def get_widget_url(self, bot_id: str, small_widget: str = None, **query) -> str:
531
569
return f'{ TopGG .BASE_URL } /widget/{ subpath } { bot_id } .svg?{ _encode_query (query )} '
532
570
533
571
Service .SERVICES = [
534
- BotListSpace , BotsForDiscord , DiscordBotsGG , TopGG
572
+ Arcane , BotListSpace , BotsForDiscord , DiscordBotsGG , TopGG
535
573
]
0 commit comments