public async Task DynastyInvite(SocketReaction reaction, IUserMessage msg) { switch (reaction.Emote.ToString()) { case EUI.ok: if (data != null) { Guid id = Guid.Parse(data); Dynasty dan = await Dynasty.Load(id); var mem = await dan.AddMemeber(player); await DynastyCommands.DynastyHub(player, dan, mem, reaction.Channel); } else { (Dynasty dan, DynastyMember _, string _) = await Dynasty.Load(player); if (player.dynasty != null) { await dan.RemoveMember(player); await reaction.Channel.SendMessageAsync($"You've left the {dan.name} Dynasty"); } } break; case EUI.cancel: await TryMSGDel(msg); break; } }
public async Task DynastyUpgrade(SocketReaction reaction, IUserMessage msg) { switch (reaction.Emote.ToString()) { case EUI.ok: _ = await Dynasty.Load(player); if (player.dynasty == null) { if (Dynasty.Exist(data)) { await reaction.Channel.SendMessageAsync( $"Dyansty name {data} is already in use"); return; } Dynasty dan = await Dynasty.CreateDynasty(player, data); await DynastyCommands.DynastyHub(player, dan, null, reaction.Channel); } else { //Upgrade } break; case EUI.cancel: await TryMSGDel(msg); break; } }