public async Task addWeaponItemAsync(string name, double value, double weight, string damage, string Dtype, string Wtype) { if (Context.User.Id != 106768024857501696) { return; } weapon w = new weapon(name, value, weight, damage, Dtype, Wtype); weapon.insert_weapon(w); await Context.Channel.SendMessageAsync("Weapon Added", false, w.toWeaponEmbed().Build()); }
public async Task showWeaponItemAsync(int i) { weapon display = weapon.get_weapon(i); if (display != null) { await Context.Channel.SendMessageAsync("", false, display.toWeaponEmbed().Build()); } else { await Context.Channel.SendMessageAsync(Context.User.Mention + ", sorry that ID doesn't match an item. Please use `bg!weapon` for a list of items"); } }
public async Task addWeaponPropertyAsync(int i, string property) { if (Context.User.Id != 106768024857501696) { return; } weapon w = weapon.get_weapon(i); if (w == null) { await Context.Channel.SendMessageAsync(Context.User.Mention + ", you messed up"); } else { var prop = weapon.stringToProperty(property); if (prop == weaponProperty.Null) { return; } w.properties.Add(prop); weapon.update_weapon(w); await Context.Channel.SendMessageAsync("Added property", false, w.toWeaponEmbed().Build()); } }