Example #1
0
        public static async Task <(Dynasty, DynastyMember, string)> Load(Player player)
        {
            if (player.dynasty == null)
            {
                return(null, null, "You are not in a Dynasty");
            }
            Dynasty dan = await Load(player.dynasty.id);

            if (dan == null)
            {
                player.dynasty = null;
                player.SaveFileMongo();
                return(dan, null, "Your dynasty was disbanded");
            }
            DynastyMember membership = dan.GetMember(player);

            if (membership == null)
            {
                player.dynasty = null;
                player.SaveFileMongo();
                return(dan, membership, "You were removed from the dynasty " + dan.name);
            }

            return(dan, membership, null);
        }
Example #2
0
 public static async Task DynastyHub(Player player, Dynasty dynasty, DynastyMember membership, ISocketMessageChannel chan)
 {
     membership ??= dynasty.GetMember(player);
     await chan.SendMessageAsync(embed : dynasty.ToEmbed(
                                     dynasty.MemberField(membership)
                                     ).Build());
 }