2020-06-22 17:27:11 +00:00
|
|
|
import royalnet.utils as ru
|
2020-06-26 14:13:11 +00:00
|
|
|
import royalnet.constellation.api as rca
|
2019-11-29 19:05:09 +00:00
|
|
|
|
|
|
|
|
2020-06-26 14:13:11 +00:00
|
|
|
class ApiDiscordCvStar(rca.ApiStar):
|
2020-02-08 00:49:07 +00:00
|
|
|
path = "/api/discord/cv/v1"
|
2019-11-29 19:05:09 +00:00
|
|
|
|
2020-03-09 20:21:07 +00:00
|
|
|
tags = ["discord"]
|
|
|
|
|
2020-06-26 14:13:11 +00:00
|
|
|
@rca.magic
|
|
|
|
async def get(self, data: rca.ApiData) -> ru.JSON:
|
2020-06-22 17:27:11 +00:00
|
|
|
"""Get the members status of a single Discord guild.
|
|
|
|
|
|
|
|
Equivalent to calling /cv in a chat."""
|
2019-12-29 23:07:48 +00:00
|
|
|
response = await self.interface.call_herald_event("discord", "discord_cv")
|
2020-02-08 00:49:07 +00:00
|
|
|
return response
|