You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fox-V3/werewolf/player.py

31 lines
673 B

import discord
class Player:
"""
Base player class for Werewolf game
"""
def __init__(self, member: discord.Member):
self.member = member
self.mention = member.mention
self.role = None
7 years ago
self.id = None
self.alive = True
self.muted = False
self.protected = False
async def assign_role(self, role):
"""
Give this player a role
"""
7 years ago
role.player = self
self.role = role
7 years ago
async def assign_id(self, target_id):
self.id = target_id
7 years ago
async def send_dm(self, message):
await self.member.send(message) # Lets do embeds later