1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/rpgpack/types/faction.py

21 lines
393 B
Python

from typing import *
import enum
class Faction(enum.Enum):
RED = "🔴"
ORANGE = "🟠"
YELLOW = "🟡"
GREEN = "🟢"
BLUE = "🔵"
PURPLE = "🟣"
BLACK = "⚫️"
WHITE = "⚪️"
BROWN = "🟤"
@classmethod
def get(cls, string: str):
try:
return cls[string.upper()]
except KeyError:
return cls(string)