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.
30 lines
629 B
30 lines
629 B
7 years ago
|
import asyncio
|
||
|
|
||
|
import discord
|
||
|
|
||
7 years ago
|
from datetime import datetime, timedelta
|
||
7 years ago
|
|
||
|
class Player:
|
||
|
"""
|
||
7 years ago
|
Base player class for Werewolf game
|
||
7 years ago
|
"""
|
||
|
|
||
|
def __init__(self, member: discord.Member):
|
||
7 years ago
|
self.member = member
|
||
7 years ago
|
self.role = None
|
||
7 years ago
|
self.id = None
|
||
7 years ago
|
|
||
7 years ago
|
self.alive = True
|
||
|
self.muted = False
|
||
7 years ago
|
self.protected = False
|
||
7 years ago
|
|
||
|
async def assign_role(self, role):
|
||
|
"""
|
||
7 years ago
|
Give this player a role
|
||
7 years ago
|
"""
|
||
7 years ago
|
role.player = self
|
||
7 years ago
|
self.role = role
|
||
7 years ago
|
|
||
|
async def send_dm(self, message):
|
||
|
await self.member.send(message) # Lets do embeds later
|