mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Cose che volevo fare ma non ho fatto
This commit is contained in:
parent
8b7a53a56c
commit
00d98805dd
1 changed files with 17 additions and 0 deletions
17
royalpack/events/discord_cv.py
Normal file
17
royalpack/events/discord_cv.py
Normal file
|
@ -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
|
||||||
|
...
|
Loading…
Reference in a new issue