From 00d98805dd296510c37e5a104505e894be8baf2a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 28 Nov 2019 15:21:03 +0100 Subject: [PATCH] Cose che volevo fare ma non ho fatto --- royalpack/events/discord_cv.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 royalpack/events/discord_cv.py diff --git a/royalpack/events/discord_cv.py b/royalpack/events/discord_cv.py new file mode 100644 index 00000000..9fd5d536 --- /dev/null +++ b/royalpack/events/discord_cv.py @@ -0,0 +1,17 @@ +import discord +from typing import * +from royalnet.serf.discord.discordserf import DiscordSerf +from royalnet.commands import * + + +class DiscordCvEvent(Event): + name = "discord_cv" + + def run(self, guild_id: int, **kwargs): + if not self.interface.name == "discord": + raise UnsupportedError() + serf: DiscordSerf = self.interface.serf + client: discord.Client = serf.client + guild: discord.Guild = client.get_guild(guild_id) + members: List[discord.Member] = guild.members + ...