public async Task CreateCharacter([Remainder] string name) { CharacterSheet character = new CharacterSheet(name, Context.User.Username); character.RollStats(); CharacterCommands.UpdateCharactersJson(character); await Context.Channel.SendMessageAsync("Creating " + name); }
public async Task GetOrSetClass([Remainder] string className = null) { string charName = CharacterCommands.GetCharacter((IGuildUser)Context.User).characterName; EmbedBuilder embed; if (className == null) { embed = CharacterCommands.DisplayOrChangeClass((SocketGuildUser)Context.User, charName); } else { embed = CharacterCommands.DisplayOrChangeClass((SocketGuildUser)Context.User, charName, className); } await Context.Channel.SendMessageAsync("", false, embed.Build()); }
public async Task RollAbility([Remainder] string ability) { EmbedBuilder embed; switch (ability) { case "str": embed = CharacterCommands.RollStr((SocketGuildUser)Context.User); break; case "dex": embed = CharacterCommands.RollDex((SocketGuildUser)Context.User); break; case "con": embed = CharacterCommands.RollCon((SocketGuildUser)Context.User); break; case "wis": embed = CharacterCommands.RollWis((SocketGuildUser)Context.User); break; case "int": embed = CharacterCommands.RollInt((SocketGuildUser)Context.User); break; case "cha": embed = CharacterCommands.RollCha((SocketGuildUser)Context.User); break; case "strength": embed = CharacterCommands.RollStr((SocketGuildUser)Context.User); break; case "dexterity": embed = CharacterCommands.RollDex((SocketGuildUser)Context.User); break; case "constitution": embed = CharacterCommands.RollCon((SocketGuildUser)Context.User); break; case "wisdom": embed = CharacterCommands.RollWis((SocketGuildUser)Context.User); break; case "intelligence": embed = CharacterCommands.RollInt((SocketGuildUser)Context.User); break; case "charisma": embed = CharacterCommands.RollCha((SocketGuildUser)Context.User); break; default: embed = new EmbedBuilder(); embed.WithDescription("Unrecognized command, try again"); break; } await Context.Channel.SendMessageAsync("", false, embed.Build()); }
public async Task ShowCharacter([Remainder] string name) { EmbedBuilder embed = CharacterCommands.DisplayCharacter(name, Context); await Context.Channel.SendMessageAsync("", false, embed.Build()); }