public async Task ResetCooldowns([Remainder] string name) { var user = UserRepository.FetchUser(Context); if (user.Cash < Config.GANG_CREATION_COST) { throw new Exception($"You do not have {Config.GANG_CREATION_COST.ToString("C", Config.CI)}. Balance: {user.Cash.ToString("C", Config.CI)}."); } var gang = GangRepository.CreateGang(Context.User.Id, Context.Guild.Id, name); await UserRepository.EditCashAsync(Context, -Config.GANG_CREATION_COST); await ReplyAsync($"{Context.User.Mention}, You have successfully created the {gang.Name} gang!"); }
public void CreateGang(Gang gang) { _gangRepo.CreateGang(gang); }