1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00
royalnet/royalpack/events/discord_cv.py

18 lines
529 B
Python
Raw Normal View History

2019-11-28 14:21:03 +00:00
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
...